Hardware Feature Extra
Name . Source
Servicing Sinclair Computers Part 2 Television magazine 1986

Servicing Sinclair Computers Part 2

Last month we considered some of the ic's used in microcomputers and ended with a block diagram of the simplest computer possible. It had just a Central Process-ing Unit (CPU - the microprocessor), a Read Only Memory (ROM) that contained the operating instruc-tions, a Random Access Memory (RAM) for storing the program and data and an Uncommitted Logic Array (ULA) for doing all the hardware jobs, including interfac-ing with the TV modulator and the tape input/output ports. Fig.1 last month was in fact a block diagram of the Sinclair ZXSI microcomputer which is probably the simplest possible home computer design. Well now exam-ine this model as an introduction to computer servicing.
In producing such a simple computer Sinclair Research introduced several features which make both the circuitry and operation rather different from that of the more usual type of microcomputer. For instance, where have all the other chips one might expect to find gone? The ones that generate the TV display signals and the decoder chips that decide whether its the ROM or RAM you want? Or the special that looks after the keyboard? They all seemed to be essential in the Amstrad machine described in this
magazine last year. In the ZX81 these jobs are all shared between the CPU and the specialised circuitry in he ULA, the timing and decision making being carried out by the former. There's a penalty to be paid for doing things in this simplified way however: the time the CPU has available for processing the program is severely limited. In fact whenever there's a display present the CPU is free only for the period of the field flyback - for the rest of the time it's producing the line sync and display details!

Sinclair ZX81 Circuit
So when you study the ZX81's circuit details (Fig. 1) remember that this is a very specialised machine with a component count unlike most other microcomputers, though it does have a standard CPU and a system that functions in the same way despite looking so different.
Further examination of Fig.1 will help to explain some of the differences and clear up many of the problems described above. You'll see that the ULA chip is con-nected to the TV and tape circuits directly at pins 16 and 20. It can decode the address lines and then enable either the RAM or the ROM via one of the Chip Select (CS) limes at pins 12 and 13. It also assists the CPU in reading the keyboard. via the KBD0-KBD4 lines. These link the ULA to the keyboard via a five-pin socket (KB1) that's not shown in the diagram. This PCB mounted socket connects the keyboard "tails" to these lines while an eight -pin socket (KB2), also not shown, connects the other keyboard tails to diodes D1-8. The ULA also produces the 3-25MHz clock signal from the 6-5MHz ceramic filter (X1) connected to pin 35.
The machine has only 1Kbyte of RAM fitted to the board. Provision is made for this to consist of either one 4118 memory chip or two 2114 chips. There's also provi-sion for fitting a 2Kbyte RAM for the export model. The usual memory extension consists of a 16K unit which plugs into the edge connector at the back of the machine. Fitting an extension memory disables the internal 1K memory however - the following test procedure assumes that only the internal memory is in use.
The data lines to the ROM and RAM and some of the ROM address lines incorporate buffer resistors. These enable the lines to be used by more than one device without conflict. They are very useful in a fault situation for determining which device is still functioning satisfac-torily. Lines downstream of these resistors are given an identifying accent, eg. A1' - The edge connector also has that identifications on some of the contacts to show which side of the resistors link up with them.
There have been at least three versions of the PCB. Fig.1 represents the issue one board but I've experienced no difficulty in identifying the circuitry on later boards. They vary a little in layout but the component numbers on the boards seem to be the same. One of the only differences on the issue three board is the use of individual resistors in place of packs RP1 and RP3 - R35-42 and R43-47 respectively. There's a photograph of an early version of the issue one board, without component numbers, on page 162 of the ZX81 BASIC Programming Book that was supplied with every machine. This photograph shows all the ic's mounted in sockets, which certainly isn't the case with later boards. Note also that the ULA is called the 'Sinclair Computer Logic' which is a less standard but perhaps more sensible name. The power supply unit is separate from the computer and connects to it via a 3.5mm jack plug. Its not shown in Fig.1 but is a simple d.c. unit that gives very little trouble - except for the moulded jack. If you have one that's been changed, make sure that the tip is positive.

Initial Checks
When the computer is first switched on the display should consist of a white-on-black K (inverse K) cursor at the bottom left of the screen. -If it doesn't, carry out the following simple checks.
Remove any extension memory plugged into the rear connector. Check the power supply - the plug should provide an Open-Circuit voltage of about 14V, tip positive. If the plug has been changed for a solder-on type it's easy to check the on-load voltage which should be about 11V. This will show whether an overload or open-circuit condition is present in the machine. In the latter case suspect that the plug has at some time been connected with reversed polarity- this often blows the 5V regulator and save the rest of the circuitry.
Check the tuning. The modulator is usually set to channel 36 quite accurately, but sweep the band in case the tuning has moved or been altered. If there's no output signal from the ULA the modulator's output will consist of carrier only, devoid of even sync signals. In this case the indication on the TV screen will be negligible.

/pj/zx81thumb.gif (19298 bytes)
fig.1 (thumbnail) Click for full image

Dismantling the ZX81
If you haven't found the fault by now you have to make internal tests. This means dismantling the unit. First remove the four screws from the base. Three of these should be hidden under rubber feet - if these are still there (the two at the front and the one at back left). Lift off the base and remove the two screws securing the PCB. If you turn the board over towards the front the keyboard tails can be removed from the two sockets. Treat these plastic strips with the utmost care - they are very easily damaged (more about this later).
With the board completely removed the TV and power supply leads can be reconnected. Initialisation of the computer to give the inverse K cursor display occurs without the keyboard being connected, so we can leave it disconnected until the fault has been Found.

Fault finding
Table 1 provides a quick fault-finding sequence: the numbers refer to the following paragraphs which give details of the procedure. Remember that there can often be more than one fault present, so repeat the sequence if necessary.

Fault

(1) The power supply should provide about 11V at 400mA on load. Less than 7V will be insufficient for the regulator to function correctly. An excessive current reading in-dicates a fault on the board.
(2) The regulator should deliver 5V to each of the i.c's on the board. Its heatsink normally runs hot to the touch, but not unbearably so.
(3) The signal from pin 16 of the ULA chip to the modulator should give a PHT indication on the logic probe (see Table 2). An oscilloscope should display a signal of 2V peak amplitude from the peak to the bottom of the sync pulses. Inverse K will produce a very faint signal near the end of the field trace.
(4) If the modulation signal is present but the TV output is absent check the modulators supply voltage and the tuning adjustment screw - this should be approximately 3mm down inside the former.
(5) If the cursor is present, connect one of the contacts of the small keyboard socket KB1 to a contact on the large socket KB2. Check whether a character or keyword appears on screen. Don't worry about shorting more than one connector in either of the sockets as this wont cause any damage to the computer - but it won't product a display either as the software checks that only one key (apart from the shift key) is being pressed before it produces a screen display.
(6) Two faults that can affect the keyboard circuit are shorts between the lines or open-circuit lines or diodes. They can be identified by their effect on the system. Open-circuits affect only the keys they connect (see Fig. I). A short effectively holds one key on, disabling the whole keyboard. Faults can occur anywhere in the circuit, from the address bus side to the diodes to the ULA chip's KBD pins. Check for shorts where the PCB tracks run obliquely under socket KB1. The resistance between these KBD tracks should be a few thousand ohms.
(7) The keyboard connection tails are very vulnerable, so to avoid unnecessary work make a thorough check that the computer is working satisfactorily before reconnecting the keyboard. Connect each contact on the small five-pin socket KB1 to at least two contacts on eight-pin socket KB2, checking the screen entries. Finally make sure that the tails are not splitting across (see following paragraph) and that the metallised contact at the ends are in good condition. Then reconnect the keyboard by turning the case face down, front towards you, with the PCB laid component side up on the case so that the edge connector is at the front left: loop the tails over and push them carefully into the sockets, with a slight rocking movement. Don't push too hard or the plastic will buckle and split. When both tails have been fitted turn the PCB over on its screw pillars and secure with two short screws.
(8) Often one bank or row of the keyboard fails to operate. This is usually due to cracks across the plastic tails severing one or more of the tracks. If the crack is near the end of he tail a clean square cut can sometimes be made. removing the fault. If not too short the tail can then be refitted. As mentioned above the end contacts of the tails should be checked to make sure that there's a good contact for the connectors. If the ends look a little dirty don't be tempted to apply a liquid solvent cleaner - some of these attack the plastic (they don't soften, it, they completely disintegrate it!).
If a satisfactory repair proves to be impossible a new keyboard will have to be fitted. These are readily obtainable and are easy to fit to the case with the self-adhesive backing.
(9) Here's a simple ROM check to establish that all the bytes of memory are being read correctly. Although its unlikely that a ROM fault could continue to be present at this point in the test sequence without being detected the check will set your mind at rest. Enter and run the program below it takes just over a minute to run. Check that the answer printed out is 835106. If the answer is 854885 the ROM is an early version. To prove this enter:
PRINT SQR .25 (square root of a quarter). An answer of 1.359 instead of .5 proves that the ROM is an early type which has a few faults. Any other answer to the program indicates a ROM error. Here's the program:


10 FAST
20 LET L = 0
30 FOR N = 0 TO 8191
40 LET L = L + PEEK N
50 NEXT N
60 PRINT L

(10) At this stage it remains only to check the tape save/load operation and box up the computer. Put in a short program - the one above will do - and save it on tape. Switch off the machine to clear it, then restart and load the program. These operations are both described in Chapter 16 of the BASIC Programming Book supplied with the ZX81.
If the tape tests o.k. the case can be assembled, the four screws fitted and the rubber feet restuck in their sockets.
(11) This is the stage you'll probably end up at if the computer has suffered major damage. You've proved that the fault lies in one or more of the chips or on the PCB.
First check whether the computer has been repaired previously. If you find evidence of modifications or soldering, -check the board carefully for solder splashes, shorted tracks etc. Where Sinclair Research fitted ic. sockets originally I've found that they fitted them to all the ic's. So if you find a board that has sockets for some of the ic's treat it with suspicion - it's probably been modified.
I don't intend to tell you how to extract a suspect i.e. but let me tell you one of the pitfalls of the method I use in order to illustrate an elusive fault condition. I use a sucker on each pin of the ic. and having removed most of the solder finally free each pin with a pair of pliers and if necessary the use of solderwick. This often leaves the odd pin still slightly secured in the hole: as the ic. is carefully removed it's important to free any such pins before they lift and break the print. It's very easy to end up with a print crack on the top of the board and if undetected this crack will be covered when the socket is fitted. So if you have a particularly difficult fault, make sure that this hasn't happened. Check the signals at the ic. pins and at the line end (the next component) to ensure track continuity.

Checking the ICs
Next. ic. checks. Table 2 lists the conditions at each pin of the ic's. The readings were taken using the Tandy Micronta logic probe featured in last November's issue of Television. The computer was at the inverse K cursor stage and the supply for the probe was taken from the 5V rail. I always fit a short wire with a small loop to the 5V plated-through hole near the regulator.

Pin IC1 (ULA) IC2 (ROM) IC3 (CPU) IC4 a/b (RAM)
1 P P P P
2 P P P P
3 P P PL P
4 P P P P
5 P P P P
6 P P P P
7 PH P P P
8 PH P P P
9 P P P L
10 P P P P
11 P P H P
12 P L P P
13 P P P P
14 P P P P
15 PH P P P
16 PH P P P
17 P P PH P
18 P P P H
19 P P P
20 L P PH
21 P P P
22 OC P PH
23 P P H
24 P H PH
25 H H
26 P H
27 H P
28 P P
29 H L
30 P P
31 H P
32 P P
33 H P
34 L P
35 H P
36 P P
37 P P
38 P P
39 P P
40 H P

P = pulse high and low LEDs lit.
PH = pulse and high LEDs lit.
PL = pulse and low LEDs lit.
H = high LED lit.
L = low LED lit
OC = no LED lit (open circuit)

To simplify checking, the pins are listed In numerical order in Table 2 though quick checks at selected pins might speed up the testing. For example I always make an initial check on the 5V and chassis pins of all the ics, then the reset line and memory request pins of the CPU and the cell select and read pins of the ROM and RAM chips. But this is only my own view of what are the more important checks or those most likely to lead to a fault indication. All the pin signals are listed, even those directly connected to the pins of other ic's. as this makes for easier checking. As mentioned earlier when describing the circuit some data and address lines incorporate buffer resistors between the ics. These Can be very useful as failure of an ic. at one end of a resistor wont affect the ic's at the other end, so you can establish with certainty which ic is faulty.
It's often easy to locate a fault or anomaly in the signals on the lines but very difficult to establish the reason. The unnecessary removal of a 40-pin ic is a non-profitable pastime to be avoided if possible. Other approaches can be adopted. One that has been with us since the earliest days of printed circuits is to cut the track. This is useful for tracing shorts, the computer equivalent of which is the loss of a logic signal. When deciding where to make the cut remember what was previously said about track cracks under sockets and try to avoid making any cut that would subsequently be covered by a socket. Another method of checking a suspect ic. is to mount a good one on top piggy-back fashion: the legs should be sprung in and care taken to ensure that here's contact at all the pins of the suspect ic. This doesn't always work but it's worth a try when you have two or three suspect soldered-in ic's. The method complements track cutting as it's particularly effective with open-circuit chips.
One last tip. When you suspect that ULA chip and don't have a Spare - I usually suspect the item for which I don't have a replacement - remember that the TV screen will be bright if the ULA is all right, even if all the other chips are defective. So a bright screen without a cursor usually means that you should look for the fault.

This concludes the notes on servicing the ZX81. Next month we'll start on the Spectrum and Spectrum

[ Main Page ] [ Features ]