STB #2 – On the Bench: Episode 1 – TRS-80 Model I CPU Restoration and Repair

On January 29th I had one of those moment of karma. I was in the right place at the right time and picked up a Radio Shack TRS-80 Model I computer with expansion interface, monitor and four floppy drives for $20, there was also various printers including a Radio Shack Line Printer II, an old PC, two typewriters and misc. other stuff. It was headed to recycle. I asked him how much for all of it? Anyhow, he didn’t have to pay the recycle fee’s and I got a pile of stuff for $20. I went ahead and recycled the old inkjet printers and PCs.

 

 

The system is fully loaded; all factory options. Lower case mod, tape counter mod, serial card, double density card and 32K in the expansion interface. The system was really dirty, it appears to have been in storage for some time. Although all the core hardware is there the cables, manuals and software were lost before the system found it’s way to me.

I did an initial cleanup of the CPU and monitor then powered them up. The monitor came up OK but should be recapped. The CPU had video issues though seemed to be working otherwise. After playing with it a bit I was confident it was running and  that the issue was isolated to the video section. I opened it up and took a look. The lowercase mod is done with a piggybacked set of two 2102 SRAMs in a socket.

 

I reseated the piggybacked 2012s hoping that was the issue but alas the issue continued. I ended up replacing 5 of the 2102s before the video section was working correctly. After removing the old 2102s I soldered in high quality double wipe sockets. I clipped the leads on the original 2102s as close to the body of the IC as possible then removed each pin using forceps and my soldering station. The 2012s can be easily replaced, the PCB can’t. You almost always want to scarify the easiest to replace components to protect the hardest to replace. As I have a huge supply of components and ICs I knew I had plenty of 2102s in my stock. My stock is a mix of NOS (New Old Stock) and socket pulls. I rarely unsolder an IC unless it’s very rare.

With the CPU and display monitor working I write a small memory test program in BASIC and left the system to test the video memory overnight. As there were no errors I consider it fixed.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

20 CLS
40 FOR ADDR=15360 TO 16383
60 FOR DA=0 TO 255
80 POKE ADDR,DA
100 RD=PEEK(ADDR)
120 IF DA=RD THEN GOTO 180
140 PRINT “ERROR ADDR:“;ADDR;” WROTE:”;DA;” READ:”;RD
160 END
180 NEXT DA
200 NEXT ADDR
220 GOTO 20

As the program runs you will see characters on the screen as each byte of video RAM is tested.

A few notes about the program:

  • Line 40 (FOR ADDR=15360 TO 16383) is the addresses in decimal for each byte of video ram
  • Line 60 (FOR DA=0 TO 255) represents each value a byte can store, 0 to 255 decimal or 0x00 to 0xFF HEX
  • Line 80 (POKE ADDR,DA) writes the test byte to video memory, you will see the character it represents on the screen assuming the video memory and sub-section are all working
  • Line 100 (RD=PEEK(ADDR)) reads back the byte we just POKED
  • Line 120 (IF DA=RD THEN GOTO 180) tests to see if the byte written matches the byte just read

I went ahead and replaced to two main filter capacitors on the CPU PCB as well. I thought about replacing the smaller electrolytes as well but for now have decided to leave the originals in place. I made this choice party due to the cable that runs between the CPU and Keyboard PCBs. It’s fairly delicate and I don’t want to break off any wires. There are also a lot of wire on the PCB due to the various upgrades, these are also easy to break off.

 

 

I then went on to clean the case by hand washing it in warm soapy water while using a paper towel to scrub a bit. It cleaned up very well.

Next were the key-caps, to say they were filthy would be an understatement. Each was removed from the keyboard, soaked in hot soapy water, scrubbed with a toothbrush, rinsed then set aside to dry. They cleaned up very nicely as well. Below shows just how dirty they were.

 

 

I used alcohol, q-tips and paper towel to clean the metal base below the key-caps. It was really dirty and took several passes before I was happy with it.

I then moved on to cleaning up the PCB a bit. There was a fair amount of solder flux from previous repair or mod jobs that I cleaned off. Besides the dead flux the PCB was pretty clean.

After reassembling the CPU the video problem reemerged. It seems I didn’t actually solve it previously or had introduced a new issue. After a lot of time it became apparent that flexing the PCB would correct the issue. This was very repeatable thus I know there was a mechanical issue such as a cold solder joint, a broken plated through hole or PCB trace.

I took the time to re-flow the majority of the solder joints on the PCB. I ended up with a solder bridge that took a bit to find. The video issue however persisted.

With the screen cleared by pressing the <Clear> key the entire screen was filled with open parenthesis – “(“s. With the screen cleared each byte of video RAM should have the value Decimal 32 /  HEX 20 / Binary 00010000 in it. Instead each byte seemed to have decimal 40 / HEX 28 / Binary 00011000 in it.

In the ASCII character set a “Decimal 32 /  HEX 20 / Binary 00010000” is the ‘SPACE’ character. It’s the character generated when you press the ‘Space Bar’ on the keyboard. This may seem a little counter intuitive as it might seem logical that a “Decimal 0 /  HEX 00 / Binary 00000000” would represent ‘no’ character displayed on the screen. A “Space” is just another character just as “A” and “b” are characters. It just happens to not display anything on the monitor (or displays a space depending on how you want to think about it).

Rest assured that “Decimal 32 /  HEX 20 / Binary 00010000” is the proper value to have in video RAM to represent a “Space”. If you’re not familiar with the ASCII character set take a look at this article. There’s a logic to the bit patterns that represent the various characters though it can be somewhat difficult to uncover.

Even with the information from above I went and tested deeper. With the board flexed so the video was working I used the program listed above to test the video RAM. I ran the program, un-flexed the board, the error occurred, the program displayed the error and ended. I then flexed the board and was able to conform from it that Data 3 (D3) was indeed incorrect. Note that this isn’t a perfect test; the issue with the video ram could have lead me astray as the displayed characters were of course affected by the issue.

ERROR ADDR: 16121 WROTE: 32 READ: 40

As 40 – 32 = 8 I know the bit weight of the offending bit. Bit weight 8 happens to be D3.

Working on older computers tends to need an understanding of numbers bases (radix) such as Decimal (Base 10), Hexadecimal (Base 16) and Binary (Base 2). If you go back far enough Octal (Base 8) comes into play as well. A great article is linked here.

In the schematic I isolated the suspect areas that could be causing the issue.

Seeing that D3 was a one (1) when I expected a zero (0) lead me to an issue with Data 3 (D3) in the video circuit. As the CPU was running I knew the issue wasn’t affecting the Z-80 CPUs access to the system ROM or RAM. Knowing the issue was isolated to the video subsection lead me to D3 based on the incorrect bit found above. This in turn led me to IC Z45. Using my oscilloscope, I could see there was activity on the Data Outputs of the other video RAMs (IC Z63, Z62, Z61, Z46 and Z47) but on Z45 its Data Output on pin 12 was always a one (1). After looking at all the other pins on Z45 with the scope they all seemed OK with the exception of the Data Output. I finally pulled the chip from the socket to uncover the fact that the Vss (Ground) pin was bent over and not making contact in the socket, flexing the board allowed this pin to touch the blade in the socket. With the Vss (GND) pin open and Vcc (+5 volt) pin connected this results in any outputs on the IC being high.

To wrap this up:

I replaced a bad 2102, I didn’t keep sufficient notes to actually know which of the 5 RAM chips I replaced was causing of the original issue. This lead to a bent pin and another video issue.  Working this new issue lead to a bridged solder join and yet another problem.

What can we learn:

  • Keep good notes.
    • I should have written down what the errors on the screen originally were, this would have helped me know if the 2nd issue was related to the first.
  • Take photos
    • With the lower-case mod, Level II BASIC mod and cassette counter mod there are a LOT of loose wires soldered to odd places across the PCB. I took photos off all the wiring including close up ones showing where the wires are soldered too. During my work, I didn’t pull any of the wires loose but having photos as backup really helps. Of course, you could find the info on the web if needed for any standard mods.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  • One step at a time
    • I probably should have replaced the video RAMs one at a time however doing so would require me to flip the boards over many additional times. With the cable between the keyboard and CPU being a weak link plus all the loose wires I elected to do them all at once. This was an intentional decision.
    • When I re-flowed the majority of the solder joints on the CPU I did them in one pass. This was partly driven by not wanting to stress the wires and cables any more than necessary. Of course, I ended up with a solder bridge. It took a lot of time using magnification and a small probe to look and feel between every solder joint on every IC pin to find the bridge. It was obvious when I found it. Of course, a lot of pins are intentionally bridged on many ICs, being able to look at the solder mask and how the bridge solder joint looks can tell you if it’s intentional or not.
      • Had the amount of loose wires and the fragile interconnect cable not been a concern I would have re-flowed one column of ICs (8-10 ICs) then would have tested. If an issue such as a solder bridge came up, I’d have a much better idea of where it was. Of course, you need to keep good notes as well to keep it all straight in your head.
  • Protect the most valuable parts
    • Early in this article I called this out. The CPU has one PCB, ruin it and it’s all over. I elected to sacrifice 5 video RAM chips all at once on the suspicion one of them was bad. I cut the pins close to the IC body then removed the body. Each pin was removed using a quality temperature controlled soldering station and a small pair of forceps. Too much heat can life traces, too little heat can result in the plated through hole coming out along with the pin when you try to pull it out.
      • Using the soldering pen I heat the solder from the TOP of the PCB. I have clear visibility of the pin this way.
      • With the solder flowed the pin should be easy to pull form the plated through hole. Don’t pull hard, if it’s stuck there is a reason.
      • Also note the power supply pins (Vss and Vcc) can be difficult to fully flow to remove the pin especially when heated from the top of the PCB. There can be large areas of copper on the back (or front) of the PCB that can take a lot of time to heat enough to get the solder to flow.
      • Just because the solder on one side of the board has flowed doesn’t mean the solder on the other side has also flowed.
    • With all the pins removed I flipped the board over and used a solder vac tool to suck the solder out of the plated through hole.
      • I start by adding a small amount of fresh solder to every pad. I know this seems counter intuitive but having the fresh solder helps melt the solder all the way through the plated through hole to the other side of the board.
      • Once all the plated through hole to be cleared out have some fresh solder I make another pass with the solder vac tool. Knowing the solder will flow easily as I’ve added fresh solder lets me concentrate on the solder vac tool instead of worrying about getting the solder to flow.
      • A tip: often you will see the solder in the plated through hole boil when it’s melted all the way through the plated through hole, this isn’t always the case BUT when it happens it’s a good sign it’s time to let the solder vac tool to do its thing.
      • If you’re having trouble with a plated through hole move on to the next one. Sometimes pads are bridged intentionally, removing the solder from the bridged pad can help remove it from the one you had trouble with.
      • Sometimes you will end up trying to clear the hole from the other side of the PCB, this can often be the case if there is a large area of copper on the other side such as with power and ground pins.

I hope you found this entertaining and perhaps learned something.

 

Leave a Reply

Your email address will not be published. Required fields are marked *