I recently went to the swap meet at the System Source Museum in Hunt Valley Maryland and scored a Kaypro II off the "free pile". The system appeared to have suffered some water damage and even though the power LED came on, I got no other life out of it. I will show more about this system in a future post. To help with the troubleshooting I pulled out a Kaypro II I had acquired a long time ago and probably hadn't powered up in decades. I quickly realized that they keyboards on both units did not work. Outwardly both the keyboards looked the same, but internally they were very different. I will take a look at them in this post.
Keytronics Keyboard
The keyboard on the system I had is by Keytronics. When I tested it, I found that none of the keys worked so I suspected it might be a problem with they keyboard logic. I took the keyboard apart and found that it is a capacitive touch keyboard with foam and foil key switches.
Here is a look at the PCB with the mechanical parts removed.
Since this keyboard has capacitive key switches a direct electrical connection is not needed between the contacts to trigger the keypress. Normally the key is activated by a foam and foil pad on the bottom of the key, but I found you can also trigger the keys my just touching them with your fingers.
Here is the bottom of the keyboards mechanics. The foam-and-foil pads had badly deteriorated which is why the keyboard no longer worked. Beyond this issue everything else on the keyboard worked fine. Replacement pads are available from texelec.com but I decided to hold off getting these until I determined if I was going to need the second keyboard or not.
SMK Keyboard
The system I got from the swap meet had an SMK keyboard. This one was badly water damaged, this picture is from after I refurbished it which I will cover in another post. Unlike the Keytronics keyboard this one uses individual mechanical key switches.
Here are the mechanical parts of the key switch. The bottom and top of the case which just snap together, the plunger which attached to the keycap and the spring that holds the plunger up.
Here are the two electrical contacts.
When the key is not depressed the bump on the side of the plunger hold the two contacts open.
When the key is pressed the bump moves down allowing the contacts to close thus activating the switch. When the key is released the spring returns it to the top position.
Theory of Operation
Despite the differences in the key switches these two keyboards function basically the same way. Here is a simplified block diagram of the keyboard electronics.
Like most keyboards these use a scanning matrix to read the keys. The keys are organized into a grid of rows and columns with a key switch at each intersection. Note that this doesn't necessarily correspond to the physical layout of the keyboard. To read the matrix a 4 bit value is placed on the inputs of a 4-16 line decoder chip which enables one of the keyboard columns. The rows can then be read in parallel and if any of them are active then the key or keys that were pressed can be determined. Once a column is read the 4 bit value is incremented to read the next column. This process repeats until all columns are read.
In these keyboards the whole process in managed by an Intel 8048 series microcontroller. The controller has program in it's internal ROM that does the scanning process, handles key de-bouncing, key repeat and communication with the system. The communication happens over a bi-directional serial connection. The 8048 doesn't have any built in serial hardware so the interface uses two digital I/O pins. An internal timer generates a periodic interrupt which allows the software to achieve the proper serial baud rate without an actual serial clock. When key presses are detected they are sent over the serial interface to the system.
The keyboard can also receive a limited set of commands from the system over this interface. These commands can generate a short beep or long beep, can turn off the beep when a key is pressed, and finally there is a test commend that causes the keyboard to send a hex AA back to the system.
The micorcontroller also has a few other miscellaneous digital IO connections. First, it directly controls the caps lock LED, and on the Keytronics keyboard there is an option for up to 8 more LEDs which aren't used on the Kaypro. It also has an output that controls the beeper in the keyboard which generates the key click sound. The Kaypro does not have any internal sound capability so some programs used the keyboard beeper to generate rudimentary sounds.
Since the Keytronics keyboard uses capacitive touch keys, it cannot connect the row and columns lines directly to digital IO pins. To handle these the keyboard uses two special chips made by Exar, the 22-950-3B row driver and 22-908-03 sense amplified. This also leads to a difference in how the Shift, Control and Caps lock keys are read. The SMK Keyboard reads them directly through digital IO pins on the controller instead of reading them through the matrix. Due to the special chips needed for the capacitive keys, the Keytronics reads these key as part of the scanning matrix.