Page 1 of 2

Zx spectrum keyboard

Posted: Thu May 04, 2023 8:07 pm
by marksmithrun
I have an issue 3 motherboard . Replaced membrane but keys 67890 still don’t work. Tried the keyboard on another board and it’s working fine. Any ideas?

Re: Zx spectrum keyboard

Posted: Thu May 04, 2023 10:17 pm
by 1024MAK
Hello and welcome to the forum.

First off, have you checked to ensure none of the old membrane tail has been left behind in the keyboard connectors.

Mark

Re: Zx spectrum keyboard

Posted: Thu May 04, 2023 11:36 pm
by marksmithrun
Yeah tried that. Even replaced connectors but still the same problem

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 2:29 pm
by 1024MAK
To test the board independently of the membrane, use a thin solid copper wire (e.g. an off-cut from a fixed telephone or Ethernet cable) with the insulation stripped back by say 6mm at each end . This will simulate a keyboard key, you can then and see if the computer responds. Touch one end in a contact in KB1 and the other end to a contact in KB2. Repeat for each combination that you want to test.

See also my diagram (originally posted on WoSf) link.

Mark

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 2:41 pm
by marksmithrun
Hi mark thanks for your help. Pin 4 on kb2 is not responding. Does this point to anything?

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 2:58 pm
by 1024MAK
Check diode D4. This is a 1N4148 type.

The anode connects to KB2 pin 4 (i.e. the membrane).
The cathode (the end with a band if there is only one band) connects to the address bus A12 line (test to pin 2 on the Z80).

A diode can be tested using the diode test on a multimeter. Or on some multimeters, using the 200 ohm resistance range.

With the red lead on the anode and the black lead on the cathode, the meter shows show either 0.5V to 0.7V or a low resistance. The other way round, it should show open circuit (or OL).

Mark

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 3:27 pm
by marksmithrun
Hi. Tried that and readings were ok. Even swapped d4 out and still the same. Did notice with multimeter there is no power going to d4 while there is to the others

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 3:46 pm
by 1024MAK
How do you mean?

The way the keyboard works, is the code in the ROM results in the Z80 producing an address on lines A0 to A15. Because it’s an input port instruction to the ULA, A0 will be low (logic zero) , A1 to A7 will be high (logic one), and one of A8 to A15 will be low, with the rest high, to select one row.

Then while the address lines are stable, the Z80 reads the data on the data bus from the ULA. The ULA in turn reads it’s keyboard input lines (five columns) and passes this on to the Z80.

Normally the ULA will see all five of its inputs at a high level due to the five resistors “pulling up” the inputs to the +5V rail.

When a key is pressed that is connected to a row where the relevant address line is low, this overrides the current from the relevant resistor, hence the relevant ULA keyboard input now sees a logic low.

The process repeats eight times, until each of the eight rows have been through the sequence.

However, note that the address bus will change state whenever the Z80 accesses any memory. Hence A7 to A15 will be constantly changing state.

It’s also worthwhile testing diodes D1 to D8 in case the track layout is different on your board (the various different issue boards have various differences).

Mark

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 3:54 pm
by 1024MAK
Here’s the keyboard diagram from the service manual:

Image

Note that the terms row and column may be swapped depending on the description.

Mark

Re: Zx spectrum keyboard

Posted: Fri May 05, 2023 4:25 pm
by marksmithrun
Thanks again. Found a temporary solution. If I run a small wire between right leg of d4 to pin 2 on the rom all the keys work again