Zx spectrum keyboard
-
- Posts: 12
- Joined: Fri Aug 19, 2022 9:25 pm
Zx spectrum keyboard
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?
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Zx spectrum keyboard
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
First off, have you checked to ensure none of the old membrane tail has been left behind in the keyboard connectors.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
-
- Posts: 12
- Joined: Fri Aug 19, 2022 9:25 pm
Re: Zx spectrum keyboard
Yeah tried that. Even replaced connectors but still the same problem
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Zx spectrum keyboard
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
See also my diagram (originally posted on WoSf) link.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
-
- Posts: 12
- Joined: Fri Aug 19, 2022 9:25 pm
Re: Zx spectrum keyboard
Hi mark thanks for your help. Pin 4 on kb2 is not responding. Does this point to anything?
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Zx spectrum keyboard
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
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
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
-
- Posts: 12
- Joined: Fri Aug 19, 2022 9:25 pm
Re: Zx spectrum keyboard
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
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Zx spectrum keyboard
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
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
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
- 1024MAK
- Posts: 5527
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
- Contact:
Re: Zx spectrum keyboard
Here’s the keyboard diagram from the service manual:

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

Note that the terms row and column may be swapped depending on the description.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp
Standby alert 
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Spring approaching...
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp


There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb

Spring approaching...
-
- Posts: 12
- Joined: Fri Aug 19, 2022 9:25 pm
Re: Zx spectrum keyboard
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