Keypad from early laptop with TR plug


20 Sep 2020, 22:03

This is an external keypad for a Toshiba T1000/T1200 8086 laptop.
toshiba-case.jpg (276.63 KiB) Viewed 204 times
It is model PA7354E and from around 1987.
toshiba-back.jpg (288.09 KiB) Viewed 204 times
It has Mitsumi switches, so it's okay for the time, but nothing special. What is unusual is how it connected to the motherboard. It has a 2.5mm mono sub-mini audio plug. That is, there are only two wires.
toshiba-plug.jpg (146.48 KiB) Viewed 204 times
Inside, the PCB is about 80% a regular keyboard, with switches and diodes in a matrix with pull-ups, connected to a microprocessor and a hex inverter.
toshiba-bottom.jpg (533.88 KiB) Viewed 204 times
Cols are on the DB port and rows on P1. The data line (the only one in this case) is connected to -INT and P24.
Toshiba Schematic.png
Toshiba Schematic.png (1.63 MiB) Viewed 204 times
The MCU is a Toshiba TMP80C48AP, a somewhat lower-power version of an MCS-48.
toshiba-top.jpg (744.34 KiB) Viewed 204 times
Things get different around the connector and power circuits. There are some extra diodes and some pretty hefty capacitors. And a special TO-92 IC (Mitsumi T520H) for resetting when power fluctuates.

So, the idea seems to be that mostly the single wire provides power, except that sometimes it switches over to bidirectional data.

Too much current is required to just drive off a GPIO like a Dallas one-wire sensor. And since signal ground needs to be kept intact, high-side switching is needed. The GPIO voltage is the same as the switched voltage and all the currents are pretty modest, so a generic (2N3906) PNP transistor should work.

There is otherwise no real question of what other signals need to be connected how.
toshiba-converter.jpg (289.01 KiB) Viewed 204 times
I tried a Piksey Atto for this build. The castellated vias are a little fussier, but only a few signals are really needed. An extra jumper is in lieu of a reset switch.

Start out with a loop that periodically (every 20ms) cuts power, pulls down the data line for a bit to wake up the controller, then switches to input to see what we get.

When no keypad is connected, the input pullup brings the line back up until we stop waiting.
Disconnected.png (20.21 KiB) Viewed 204 times
With the keypad plugged in but idle, it's pulled down again briefly, which is promising.
Idle.png (21.59 KiB) Viewed 204 times
Set up some code to filter out that idle pattern and trigger (via another temporary output pin) and indeed some real data starts to appear.
1.png (24.1 KiB) Viewed 204 times
2.png (23.98 KiB) Viewed 204 times
3.png (23.6 KiB) Viewed 204 times
7.png (23.41 KiB) Viewed 204 times
8.png (23.07 KiB) Viewed 204 times
9.png (23.56 KiB) Viewed 204 times
The first thing that jumps out is that the number of level transitions is fixed. So this isn't a regular mark/space kind of serial encoding.

Concentrating on the bit in the middle, there are eight pairs, each in one of two patterns: long-short (around 250us low, 150us high) and short-long (around 100us low, 300us high).

7, 8, and 9 sure look like they are counting their own digit, with long-short as zero and short-long as one. In which case, they are 47, 48, and 49 for the whole scan code. And 1, 2, 3 are 4F, 50, 51. Now those codes should be familiar, since they match the XT scan codes. This is further confirmed by that fact that both / and Enter send E0. Some of the numpad keys had that prefix to distinguish from other keys in the main typewriter section.

Now a more complicated program is needed to be able to see more than one non-idle transaction. With that, Enter is confirmed as E0 1C. And we see that there are break codes with the eighth bit set, per the XT protocol. So that's nice. This borrowing of codes makes sense, since the laptop would want to merge the external keypad with the attached keyboard in the BIOS so that DOS just sees a single keyboard. And the MCS-48 has plenty of cycles to encode it.

All of this is enough for a QMK implementation.

Looking around, it appears that some late-80s / early-90s Compaq laptops also had an external keypad with a 2.5mm audio plug. I wonder whether this is the same or similar Mitsumi circuit. The keypads seem to be cheap enough on eBay that I can get one and see.


26 Sep 2020, 23:59

As planned, I got one of those Compaq external keypads, the 2697. I believe this is from the mid-'90s.
Compaq-back.jpg (336.27 KiB) Viewed 130 times
It adds a scaled-down navpad.
Compaq-case.jpg (453.12 KiB) Viewed 130 times
The switches are Mitsumi rubber dome over membrane and the PCB is indeed made by them as well.
Compaq-top.jpg (1.5 MiB) Viewed 130 times
The design is rather more modern: in addition to the two pre-fab matrices, it uses a custom Mitsubishi CMOS controller, M50925. Still needs some hefty capacitors.
Compaq-bottom.jpg (1.15 MiB) Viewed 130 times
The protocol is simpler now. It's just 9600 baud serial. The MOSFETs are enough for it to be able to pull down the data line even when powered. There is no longer any fancy timing needed on Vcc to switch between power and data modes. In fact, doing that tends to lose key presses, as I discovered when trying to existing diagnostic program on the new keypad. The scope showed what was clearly serial, but several key presses were needed to get it to "take." Really to have the periodic pull-down that the Toshiba needed not collide with the serial byte.

I put it as a sibling of the Toshiba, since they can use the same converter hardware, but with different firmware.

Post Reply

Return to “Workshop”