The phantom key press (menace)

Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: The phantom key press (menace)

Post by Lardo Boffin »

sirmorris wrote: Wed Sep 27, 2017 4:17 pm <cough> transistor on top of the processor <cough>
Yes - there is one of those!
Does it need refitting / replacing? I think I read somewhere that they were added to fix various issue with I/O.
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: The phantom key press (menace)

Post by Lardo Boffin »

Interestingly when I plug my Spectra SCART into it I get a lovely red background rather than white! It clearly does not like stuff plugged into it.
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: The phantom key press (menace)

Post by sirmorris »

Keyboard is read using IO.

The reason I pointed this out is that Mark specifically asked about a transistor not 4 posts ago... Maybe something might come of this.
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: The phantom key press (menace)

Post by RWAP »

It has been suggested on Facebook (as posts are automatically copied to the ZX81 group there) that : "Somebody with an account please suggest to them that it's either the pullup resistors on the keyboard data line socket, or the diodes on the keyboard address line socket"
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: The phantom key press (menace)

Post by Lardo Boffin »

RWAP wrote: Wed Sep 27, 2017 6:41 pm It has been suggested on Facebook (as posts are automatically copied to the ZX81 group there) that : "Somebody with an account please suggest to them that it's either the pullup resistors on the keyboard data line socket, or the diodes on the keyboard address line socket"
Thanks to them for the suggestion and to you for passing it on. :D

Now - are there any spectrum experts who can tell me the appropriate parts to order and exactly where to fit them... Unless it is an expert level job in which case I may have to pass it on. :?
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: The phantom key press (menace)

Post by 1024MAK »

Yes, the resistors used as pull-ups, or the diodes that are supposed to isolate the address bus boom the keyboard matrix may also be suspects.

But I think first up is the transistor that is mounted on top of the Z80 ULA. This is TR6. It was added by Sinclair because the ULA address decoding is incomplete for Z80 input/output (I/O) operations. TR6 prevents the ULA from responding when address line A0 is high, and so limits the ULA to even I/O addresses. So check that the transistor leads/wires are connected correctly. The transistor is normally a ZTX312 or a ZTX313. It's base should go to the Z80 pin 30 (A0). It's collector should go to a +5V connection (Z80 pin 11) and it's emitter should go to the ULA pin 33 or the left hand side of R27 or connect to a PCB track that goes to these.
IMG_5339.JPG
TR6 on top of the Z80 CPU in an issue 2 ZXSpectrum board
(457.35 KiB) Downloaded 463 times
With no expansions connected, the transistor does not do much. But if you use an expansion that uses any of the I/O port addresses (back in the early 1980s, this was mostly joystick ports), then either a running machine code program can't read the keyboard, or can't read the joystick, or other strange things happen.

Schematic here (but keep in mind that this is unclear in places and has some errors).

The service manual also details this modification. Look at the section titled transistor mod here.

The keyboard pull-up resistors are R65 to R69 (yes I know it says R64 to R68 on the schematic, it's wrong!). All are 10k ohm (unless it's in a Plus case). So with the Spectrum disconnected from the power supply, test each using the 20k (or equivalent range) resistance range on your multimeter.
The diodes are D1 to D8. Some of the diodes used were unmarked. 1N4148 are suitable replacements. But first test each, both ways round using a multimeter on the diode test range.

A failure of a resistor, or of a diode would normally effect the operation of the keyboard even if there is no expansion fitted. But a resistor may have gone high in value, or a diode may have become 'leaky', hence the fault only showing up some of the time.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: The phantom key press (menace)

Post by 1024MAK »

See also this blog entry

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: The phantom key press (menace)

Post by Lardo Boffin »

Thanks Mark!

The ZTX313 on mine looks to be fitted in the same way as your image.

I checked R65 to 68 (have not found 64 yet) and got a reading of around 4.1 on each when on the 20k test setting. This was with the COM lead on the right hand leg as you look down on the motherboard.

I checked D1 to 8 and all gave 1 when connected COM to the left leg (looking down) / red to the right and around 0.68 to 0.69 the other way.

Not sure what the numbers mean (noob alert) but they are pretty consistent.

Lardo
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: The phantom key press (menace)

Post by 1024MAK »

Lardo Boffin wrote: Wed Sep 27, 2017 11:02 pmI checked R65 to 68 (have not found 64 yet) and got a reading of around 4.1 on each when on the 20k test setting. This was with the COM lead on the right hand leg as you look down on the motherboard.

I checked D1 to 8 and all gave 1 when connected COM to the left leg (looking down) / red to the right and around 0.68 to 0.69 the other way.

Not sure what the numbers mean (noob alert) but they are pretty consistent.
On the resistors, first, it's R65 to R69 (caught out by yet another error on that schematic :oops: ). The resistors are 10k ohms, but because they are being tested in-circuit, the result will be lower. On the issue 2 board that I have to hand, I get about 6.4k ohms with no membrane fitted. As long as they are all very similar, the value is not too important.

With the diodes, the diode test range (on most modern multimeters) gives the forward voltage of the semiconductor junction. With silicon diodes, this is between 0.6V and 0.7V, typically around 0.65V. In the other direction, the meter should show it's over-range indication (either OL or the left hand digit showing or flashing a 1).

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
1024MAK
Posts: 5103
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: The phantom key press (menace)

Post by 1024MAK »

If all the checks and tests appear to be okay, it's time to try swapping the ULA into another working board AND putting a known good ULA in this board. If the fault moves, it's the ULA.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
Post Reply