Mini keyboard for Z-80 card

Depending on the application of the Multifunction (Ref. 1), a basic set of switches to control the program flow may be required. Also, in some cases. the PC/XT keyboard that can be connected to the card may prove a little too bulky to be carried around. The keyboard plus LED indication described here is connected to PIOA on the multi-function Z80 card. The 10 keys are arranged horizontally (see PCB layout) on a board fitted behind the enclosure front panel and serve to control functions determined by the user software. With the exception of S1 and Sao, each key has an associated LED to indicate the key status. The number of the key pressed is conveyed to the PIO in the form of an inverted 4-bit binary number supplied by IC2, a 1040-4 line priority encoder Type 74HCT147. No key pressed gives output value 15 (binary), while, for instance, key 2 gives 15-2=13. Bits 6 and 7 are normally logic high but can be strapped low if desired by fitting jumpers. They may be used as required by the application. A suggestion: the 7.80 soft-ware, on reading the key number, causes the P10 on the Z80 card to pull line PA4 high. which enables shift register ICI. Next, the PIO causes one of the LEDs to light by outputting the appropriate number of clock pulses via line PA5. Since the LED activity is controlled by the keyboard decoder software, rather than directly by the keys, the user has a good indication that the selected function has been accepted by the system. In principle. K1 on the keyboard unit can be connected to any of the three P1Os on the Z80 card; 1c4. K5 or The keyboard/LED routines in the BIOS EPROM (ESS6121), however, are based on connection to K4 (PIOA). The routines ‘READ-EXTRA KEY and ‘LED OUTPUT provided in the BIOS, .and a demonstration program on the project diskette (ESS 1710), make life easy for the Z80 programmer by offering simple ways of reading the keys, and controlling the LEDs, respectively.

Mini keyboard for Z-80 card Schematic diagram

The user is, of course, free to determine the functions of the keys and LEDs, or, indeed, to omit one or more keys or LEDs not required for this application. Switch S10 has a special function and is not read by the Z80: it is the LCD backlight control switch that uses two bistables (IC3a and IC3b) to provide a toggle function. Transistor T1 is effectively connected in series with the backlight supply and the backlight input of the LCD (more details on this may be found in Ref. 1). The outputs marked ‘BL’ are connected to the jumper marked ‘LCD’ on the ISO card. If the backlight is very weak, the BL connections should be interchanged. In this application, the BD 140 will happily work in both directions, but its current gain will be much lower when the collector functions as the emitter. Construction of the keyboard unit is simple. As indicated by the dashed outlines on the component overlay, the keys and LEDs are fitted at the solder sides of the board.
Finally, the unit is connected to the Z80 card via a length of 14-way flat-cable fitted with IDC sockets. Connector K1 may be either a 14-way box header or a 14-way male IDC connector. The latter may be soldered permanently to the PCB if the other end of the cable is fitted with an IDC socket. Alternatively, if a box-header is used in position K1, the flat cable will have IDC sockets at both ends. Power is supplied via this cable by the Z80 card.

Parts list
R1;R2 = 100 kΩ
R2-R9 = 680 Ω
R10; R11; R12; R14: R16-R23 = 10 kΩ
R15 = 390 Ω
C1; C2; C3 = 100 nF
D1-D8 = LED, 3 mm, red
D9 = 1N4148
T1 = BD140
Integrated circuits:
IC1 = 74HCT164
IC2 = 74HCT147
IC3 = 74HCT74
K1 = 14-way box header or male IDC connector (see text).
S1-S10 = PCB-mount push-to-make button. Type 3CTL3 (Amroh).
PCB Ref. 924047.
1. “Multipurpose Z80 card”, Elektor Electronics May and June 1992.