Wang C-50 Calculator
Again, thanks to the folks at UMass Boston cleaning out their dungeons, I found another cool artifact.
​
This time, it was a Wang C-50 calculator serial # DH1546 with a "Passed QC" date of October 15, 1973.
​
Rick Bensene's excellent Old Calculator Web Museum has a page on the closely-related C-52.
​
Here's what it looks like now that I've got it all fixed:
When I fired it up, the display showed digits but they were garbage, and, although it would respond to keypresses, the responses didn't make sense. Clearly it was ill.
​
I first tried "all the usual tricks":
-
Disassemble and thoroughly clean the keyboard.
-
DeOxIt on the boards and connectors.
-
Pull out all the RAM and ROM and give them the "DoOxIt treatment"
-
clean, desolder, and re-solder the corroded connections on the main PC board.
​
None fixed it; I was going to have to dig in and do some serious debugging.
What's wrong?
I had one clue to start with. When it was 'ish-working', if you typed a "1", it added a "1" to the display; if you typed a "2", it added a "3"; typing "3" gave a "3"; typing "4" gave a "5". This suggested that there was something wrong with the least significant bit somewhere in the circuit.
​
So, I first traced the keyboard circuit and connected it to a set of 4069 CMOS hex inverters driving some LEDs to monitor the keyboard outputs. I could see that 7 of the pins on the keyboard connector were connected to the diode matrix and switches (which I did not trace!). All 7 of these outputs could be independently activated depending on which key I pressed. No 'dead bits' here. Therefore, the keyboard was OK.
​
I then traced the circuit of the display board but I realized that this was not necessary as I could, with a variety of keypresses, get every numeral in the display to show the digits 0-9 so that was OK too.
​
I then looked at where the keyboard signals go. They go to a pair of 74L98's ("4-bit data selector/storage register"). Looking at the input and output signals of the 78L89's with the Saleae 8 showed that the '98's were AOK.
​
After that, the keyboard signals go to the ALU board into a data selector and finally the ALU chip itself (74181).
​
It was then that it dawned on me that the RAMs could be bad. The C-50 uses 4 Intel 1101A 256x1 static RAM chips. These were among the first MOS RAMs made. Perhaps they could be bad. I asked Rick Bensene and he said, "Yes…indeed, the old 1101’s do “just die”. They are early chips fabricated with bleeding edge tech at the time, and the effects of aging weren’t really known. What happens to them is called metallization creep. The metal traces in the IC grow tiny “whiskers” that end up shorting to other traces. It typically happens on power supply metallization, causing shorts that lead to metallization vaporizing, causing the chip to stop working. Sometimes they go quietly, other times they can actually fracture the plastic package. I have had quite a few 1101’s go bad over the years…and they are getting a little tough to find."
​
After tracing the circuit to be sure I understood it, I built a "1101A tester" with a Teensy 3.2 (an Arduino relative) driving some 74LS244 buffers to convert the 3.3V Teensy to 5V logic levels. The program on the Teensy first saved and tried to read back 0 to all even locations and 1 to all odd locations, then the reverse. I then pulled out and tested each of the four RAM chips. Two were faulty - one had no output at all and one was 'sketchy' - sometimes working and sometimes not. Interestingly, the totally dead one was the least significant bit - consistent with the numerical errors I saw above.
How to replace the RAM?
Rather than risk buying expensive and non-functioning 1101A chips from eBay, I looked around in my junkbox. It turned out I had 2 CDP1822 (256x4 RAM) chips I'd also found in the UMB dungeon. These were part of the RCA COSMAC microcomputer but, since I didn't have the full chipset, I figured I could sacrifice one for the C-50. As an added bonus, the CDP1822s have separate Data in and Data out lines - just like the 1101A. The only wrinkle is that the 1101A uses a !R/W (write enable) while the CDP1822 uses a R/!W (read enable) - this was easily fixed with a 7404 inverter. The timing requirements looked similar, so I set it up on a breadboard with a set of DIP ribbon cables plugged into the RAM sockets:
You can see the calculator at the foreground. The ribbon cables are plugged into the sockets that held the 1101As. On the breadboard, you can just see the 74LS04 under the red ribbon cable. The CDP1822 is hidden by the DIP clip connected to the Saleae 16. The 'scope was just there in case I needed to be sure the levels wouldn't fry the Saleae.
​
After fixing a bad connection in one of the ribbon cables (the red one), it WORKED! So the bad RAM was the problem after all.
A more permanent repair
The next step was to build a more permanent version of the replacement RAM board that I could wire to the pins on the Wang RAM board. The circuit was simple and I had some copper-clad perf board so I decided to etch it myself. It came out badly (sharpie isn't a fabulous etch resistant) but good enough to work.
​
From the pictures below, you can see what an ugly kluge it is. But it works.
The add-on is the blue board at the left. From left to right, you can see:
-
some pins I added to make monitoring the RAM address, data, !CS, and R/!W signals for debuggung or figuring out how it works
-
the two chips I added: the larger is the CDP1822 and the smaller is a 74LS04 inverter for the R/!W signal
-
the ribbon cables connect to where I removed the 4 1101A chips
-
only one of the 4 ROM sockets and only four of the RAM sockets were occupied in the original calculator. Presumably, the calculator could be upgraded by adding more of both.
You can see the poor quality etching job and all the patching I had to do. Fortunately, the circuit was very simple.
How does it work?
I have only started looking at it but here are some clues based on monitoring the RAM signals with the Saleae16.
​
First, at low time resolution, this pattern repeats over and over - scanning the display at about 1kHz:
The display was showing +285.000
1100 = "+" and 1010 = "."
​
The Di lines are changing very fast but since the R/!W line stays high, none of this gets written to RAM.
​
So, all the time, it's refreshing the display from RAM locations 0-15.
​
For time scale, A0 is clocked at about 1kHz.
When you press a key, the action speeds up dramatically - it tries to get all the work done in between updating the display.
Here, I typed "1" into the most significant digit and you can see that it wrote 0001 to location 1 in the RAM at the red vertical line.
​
Note that the write pulse is only 0.5µSec wide! This is the minimum for the 1101A.
The shot below is adding 45 to the 12 that were already in the accumulator. It's a lot but it looks like it starts by clearing the display register (RAM 0-15) and then writing to other locations in the RAM. Looks like a cool subject for further investigation...
Here's a short video of it in action:
Another vintage calculator back in action.
I still don't know what the "GO" button does...
Many thanks to Rick Bensene for all his help and encouragement; this would not have happened without him.
May 16, 2020