Jump to content

Sinclair ZX Spectrum 128 Keypad and Serial Port Repair

From RetroTechCollection
Spectrum 128 Version 6K R137 location (Spectrum for Everyone)
R137 (boxed) beside IC34 on a Version 6K board, near the keypad socket and the 5 V regulator (photo: Spectrum for Everyone)

The numeric keypad and the RS-232 port of the Sinclair ZX Spectrum 128 share one circuit. The port A data store of the AY sound chip (IC32) sends and receives the bits, an MC1488 line driver (IC33) turns the outgoing bits into RS-232 levels, and an MC1489 receiver (IC34) turns the incoming ones back into logic levels. The 1488 needs both +12 V and −12 V, which come from the 128's own inverter, and the keypad takes its power from the +12 V line.[1] A fault anywhere along that path stops the keypad, the serial port or both.

On Version 6K boards, the first UK version, R137 has the wrong value. It feeds the 1488's negative supply, which ends up out of specification, so a keypad will not work. The fix, identified by Ian Gledhill, is to fit 15 Ω at R137; Version 6U boards were corrected at the factory.[2] Sinclair's parts list gives R137 as 47 Ω.[3] The keypad was sold with the Spanish 128 but never in the UK, so few exist.[2]

Symptoms

[edit | edit source]
  • A keypad does nothing on a Version 6K board, while the rest of the computer works: R137.[2]
  • Both the keypad and the serial port are dead: the ±12 V supply to IC33, then the inverter that makes it.[1]
  • The keypad is dead for about three seconds after switching on. This is normal: the keypad's processor needs that time to start before the computer synchronises with it.[1]
Spectrum 128 Version 6K main board (Spectrum for Everyone)
A Version 6K board; the legend "128K SPECTRUM © 1985 VERSION 6K" is along the front edge (photo: João Diogo Ramos, via Spectrum for Everyone)

Safety

[edit | edit source]

The 128 runs from an external 9 V pack and has no mains voltage inside.[1] Take normal anti-static precautions and use an earthed, low-power soldering iron.[4]

Tools and parts

[edit | edit source]
  • A multimeter; an oscilloscope helps for the signal checks.
  • A 15 Ω resistor for R137 on a 6K board.[2]
  • For the inverter: ZTX650 (TR4) and ZTX213 (TR5), the types in Sinclair's parts list.[5]
  • MC1488 and MC1489 (or SN75188 and SN75189) if the driver or receiver has failed; Sinclair's spares list gives these alternatives.[6]

How the circuit works

[edit | edit source]
Sinclair Spectrum 128 keypad circuit (service manual Figure 1.7)
Sinclair's keypad circuit: the four-way connection (+12 V, TXS, RXS, 0 V), R1 and the 5.1 V zener D1 that supply the PIC, the 4.3 V zener D2 on the receive line, and the 5 × 4 key matrix
  • Computer to keypad: the Z80 writes bit A0 of the AY's port A (I/O address BFFDh). IC33 converts it to an RS-232 level and sends it to the keypad's receive line, where a 4.3 V zener limits the swing to between 0 V and +4.3 V.[1]
  • Keypad to computer: the keypad's PIC answers on its transmit line. IC34 converts it back to a logic level, and the Z80 reads it as bit A5 of port A (I/O address FFFDh). IC34 sees a mark as 0 V and a space as anything above +3 V.[1]
  • Power: the keypad's PIC runs from +5 V made from the computer's +12 V by a simple stabiliser (R1, 47 Ω, and the 5.1 V zener D1 in Sinclair's figure).[1]
  • Serial port: the same port A carries the RS-232 lines. Bits A3 and A2 drive RXD and CTS through IC33; DTR and TXD come in through IC34 to A6 and A7.[1]
  • Supplies: the inverter (TR4 and TR5) raises the 9 V input above 12 V. D15 and C44 rectify and smooth it for +12 V, and a charge pump (C111, C112, D28, D29) on the same square wave makes −12 V. Zener D19 takes −5 V for the expansion port from that rail.[1]

Procedure

[edit | edit source]

Opening the case

[edit | edit source]
  1. Unplug all leads and turn the computer upside down. Remove the eight fixing screws, noting where the two countersunk ones go.[4]
  2. Turn it right way up, separate the halves and disconnect the two keyboard ribbon cables.[4]
  3. Note the board version: the 6K board is marked "VERSION 6K" along its front edge.

Checking the supplies

[edit | edit source]
  1. Power the computer and measure +12 V at IC33 pin 14. Sinclair's figure is +12 V ± 0.5 V.[7]
  2. Measure the negative supply at IC33 pin 1. Sinclair's table gives −12 V ± 3 V at "IC34 pin 1", but on the 1488 the negative supply is pin 1, while pin 1 of the 1489 is a receiver input; the 1489 has only a positive supply, on pin 14.[7][8][9]
  3. Measure −5 V at the anode of D19.[7]
  4. If the +12 V and −5 V are present but the negative supply at IC33 is low and the board is a 6K, replace R137 with 15 Ω and measure again.[2]
  5. If +12 V and −12 V are both missing, the inverter has stopped. T.I.S.'s field-service notes for the 48K, which uses the same transistor types, say TR4 is very prone to damage, and that TR5 and the coil should be checked before a new TR4 is fitted, because all three sometimes fail together and a new TR4 can fail again at once.[10]
  6. If +12 V is present but −12 V and −5 V are missing, check the charge pump: C111, C112, D28 and D29.[1]

Replacing R137 on a 6K board

[edit | edit source]
  1. Take the board out of the lower case: remove the board fixing screws and the fixings that hold the 7805 regulator to the finned heatsink.[4]
  2. Find R137 beside IC34, between the keypad socket and the 5 V regulator (see the photograph).[2]
  3. Desolder R137 and fit a 15 Ω resistor in its place.[2]
  4. Check the board for solder splashes.[4]

Following the signal

[edit | edit source]

With the supplies correct and a keypad connected:

  1. Measure +12 V on the keypad's supply line at its plug, and about +5 V at the keypad's processor (pin 14 of IC1 in Sinclair's keypad figure).[1]
  2. Wait three seconds after switching on, then watch IC33's output to the keypad with an oscilloscope. Once synchronised, the computer asks the keypad for a scan every other interrupt, so there should be regular activity.[1]
  3. Follow the path in Sinclair's description: if the signal from the AY reaches IC33 but nothing comes out towards the keypad, the driver IC33 is the suspect; if the keypad answers on its transmit line but nothing comes out of IC34 towards the AY, the receiver IC34 is.[1] Sinclair's own fault list for the 128 was never completed, so there is no manufacturer sequence beyond the supply checks.[7]
  4. The keypad and RS-232 sockets are six-way BT-type telephone sockets (BICC 603A).[3] Clean their contacts if the fault comes and goes.

Testing

[edit | edit source]
  1. Switch on, wait three seconds, and press keys on the keypad in 128 BASIC; the keys should register.[1]
  2. Test the serial port with a device known to work.
  3. Reassemble with the keyboard ribbons lying in an S shape.[11]
[edit | edit source]

References

[edit | edit source]
  1. ↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 ZX Spectrum 128 Service Manual, Sinclair Research, section 1.8 "RS232/MIDI Interface" (p. 17), section 1.9 "Keypad Scanning" (pp. 17–19), section 1.10 "Power Supplies" (p. 20) and Figure 1.7 "Keypad Circuit" (p. 21). Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).
  2. ↑ 2.0 2.1 2.2 2.3 2.4 2.5 2.6 "Fixing Keypad Issues on an Issue 6K 128K Toastrack", Spectrum for Everyone. The R137 fault on Version 6K boards, its effect on the MC1488's negative supply, the 15 Ω fix (credited to Ian Gledhill), its correction on the 6U, and the keypad's sale only with Spanish machines.
  3. ↑ 3.0 3.1 ZX Spectrum 128 Service Manual, Sinclair Research, Table 5.4 "Main PCB Components" (pp. 35–39): R137 47R; IC33 1488; IC34 1489; KEYPAD and RS232 6-way telephone jack sockets, BICC BT type 603A. Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).
  4. ↑ 4.0 4.1 4.2 4.3 4.4 ZX Spectrum 128 Service Manual, Sinclair Research, section 4.3 "Repair" (p. 29), and section 2.1 "Disassembly" (p. 22). Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).
  5. ↑ ZX Spectrum 128 Service Manual, Table 5.4: TR4 ZTX650, TR5 ZTX213. Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).
  6. ↑ ZX Spectrum 128 Service Manual, section 5.6 "Part Number References": IC 1488/MC1488P/SN75188N (X-1067) and IC 1489/MC1489P/SN75189N (X-1068). Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).
  7. ↑ 7.0 7.1 7.2 7.3 ZX Spectrum 128 Service Manual, section 4.2.3 "Initialisation" (pp. 27–28): +12 V DC ± 0.5 V at IC33 pin 14; −12 V DC ± 3 V at "IC34 pin 1"; −5 V at the D19 anode. Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).
  8. ↑ Texas Instruments, SN55188, SN75188 Quadruple Line Drivers datasheet: pin 1 VCC−, pin 7 GND, pin 14 VCC+.
  9. ↑ Texas Instruments, SN55189, SN75189 Quadruple Line Receivers datasheet: pin 1 is input 1A, pin 7 GND, pin 14 VCC.
  10. ↑ ZX Spectrum Servicing Manual, Thorn (EMI) Datatech for Sinclair Research, March 1984, with T.I.S. "Repair Data" appended (PDF p. 60 onwards). Hosted as ZX Spectrum Servicing Manual (Thorn EMI Datatech, 1984) (PDF). Written for the 48K Spectrum.
  11. ↑ ZX Spectrum 128 Service Manual, section 2.2 "Assembly" (pp. 22–23). Hosted as Sinclair ZX Spectrum 128 Service Manual (PDF).