Some serial ASCII keyboards

MMcM

12 Apr 2021, 07:32

While not as common as a strobed parallel interface, one occasionally runs across vintage keyboards that use TTL-level serial to communicate ASCII characters with the terminal. The terminal itself will usually use RS-232 level serial to send ASCII to the modem / host. In addition to the voltage / polarity difference, the keyboard needs to talk to the terminal when in local / setup mode.

There are keyboards that use 7- or 8-bit serial to pass key codes, rather than ASCII characters, to the terminal, such as Sun or Convergent.

In this topic, I am also somewhat arbitrarily excluding protocols that augment ASCII with some more direct indication of the state of the shift keys. In a parallel protocol, the shifts could just take more single-bit signals, often not synchronized with the strobe pulse. With serial, more bytes are needed. For example, the NMB TeleVideo keyboards send two bytes: first a bit-mask of shifts and then the ASCII character, which has those shifts applied already. This extra information offers a better chance of implementing a USB keyboard. With just the ASCII character, about the best one can do is implement a CDC serial port.

Along with the CMOS chips that implemented key switch matrix scanning, ASCII conversion, and parallel output, which were common in early hobbyist computers, there were serial versions. For instance, the parallel NS MM5740 was complemented by the serial MM57499. This 1200 baud encoder is used in the Bridge terminal. The 4P4C modular jack is a good sign that serial is involved, and ASCII is a reasonable bet. Conversion to USB is just a matter of a CP2102.

Such low speed is also well within the capabilities of an MCS-48. The TeleVideo TS 800A did 1200 baud with an 8048. In addition to taking 12V power, the fourth signal on this keyboard is a direct analog signal for the speaker. So, as seen there, there is a choice between a CP2102 for just serial output, or an actual microcontroller to do beeping too.

Serial can also be used for the to-keyboard direction if there is any control that the terminal needs. The HDS APL keyboard implemented bidirectional 9600 serial with an 8748. A byte sent to the keyboard is just a bit-mask for which LEDs to light.

The next step is actual commands to the keyboard that implement a variety of controls. Kaypro is a good example of this: 4P4C RJ for 5V power and bidrectional 300 baud serial. Output is ASCII with extended characters for the arrow keys. Input commands enable / disable key click and beep the "bell." Again a CP2102 is perfectly adequate as a conversion. But one can also use a microcontroller to translate ASCII BEL to beep and convert the arrow keys to VT100 equivalents so that they just work in screen or cu.
Kaypro-converters.jpg
Kaypro-converters.jpg (198.75 KiB) Viewed 3616 times
Last edited by MMcM on 12 Apr 2021, 07:40, edited 1 time in total.

MMcM

12 Apr 2021, 07:38

This keyboard with rotary encoder is from some kind of Rohde & Schwarz test equipment.
Rohde-Schwarz-case.jpg
Rohde-Schwarz-case.jpg (381.57 KiB) Viewed 3611 times
Rohde-Schwarz-back.jpg
Rohde-Schwarz-back.jpg (924.24 KiB) Viewed 3611 times
There are a few scratches to the paint, but the thing is pretty rugged.

It has vintage Cherry MX black switches on a Cherry PCB, G80-0774.
G80-0774-top.jpg
G80-0774-top.jpg (1.39 MiB) Viewed 3611 times
G80-0774-bottom.jpg
G80-0774-bottom.jpg (1.59 MiB) Viewed 3611 times
The connector is a 1/4" stereo plug. That is, it only has three wires. The LEDs, particularly the one that switches between vertical and horizontal for the dial, might imply, but do not require, some to-keyboard communication. The VT100 managed bi-directional serial over a single line, but there was a lot of engineering involved and there isn't enough extra hardware here.

In the end, it's just 2400 baud ASCII. Alpha Lock and Num Lock are handled locally. When Num Lock is enabled, the numpad keys just send the ASCII digit; otherwise they send the extended character with B0 added. The F keys are E0-E9, shift C0-C9, ctrl 80-89. Break is FF (that is, just a start bit). Shift also toggles Num Lock mode for the numpad keys.

Switching ⇳⬄ direction? That's just Shift, too. When you press it, the horizontal LED turns off and the vertical one turns on. The rotary encoder switches from EA / EB to CA / CB, pretty much as though clockwise and counter-clockwise were F12 and F11,

Once again, converter is just a USB-to-UART bridge.
Rohde-Schwarz-converter.jpg
Rohde-Schwarz-converter.jpg (370.08 KiB) Viewed 3611 times

User avatar
kbdfr
The Tiproman

12 Apr 2021, 12:11

Thank you for documenting this board, I have the same (with its legend paper strip over the F keys and a slightly damaged F7 keycap):
.
Rohde & Schwarz.JPG
Rohde & Schwarz.JPG (559.45 KiB) Viewed 3575 times

MMcM

12 Apr 2021, 16:31

kbdfr wrote:
12 Apr 2021, 12:11
I have the same (with its legend paper strip over the F keys and a slightly damaged F7 keycap):
Do you know what equipment it went with? The F key action descriptions are still pretty general.

Are all the LEDs there red? That might suggest a slightly older model than amber.

User avatar
kbdfr
The Tiproman

12 Apr 2021, 17:41

MMcM wrote:
12 Apr 2021, 16:31
kbdfr wrote:
12 Apr 2021, 12:11
I have the same (with its legend paper strip over the F keys and a slightly damaged F7 keycap):
Do you know what equipment it went with? The F key action descriptions are still pretty general.

Are all the LEDs there red? That might suggest a slightly older model than amber.
As far as I know, it went with the Rohde & Schwarz FSA and FSB spectrum analyzers (whatever that may be :lol: ).
https://www.radiomuseum.org/r/rohde_spe ... r_fsa.html
https://www.rohde-schwarz.com/uk/manual ... 28795.html

And not sure about the LEDs, access to my stuff is difficult atm.

For more details perhaps you could ask hansichen. There are pics in his post.

MMcM

26 Apr 2021, 06:28

This is KB-74 from Cybernetic Data Products, used with the SilentRadio.
kb-74-case.jpg
kb-74-case.jpg (1.05 MiB) Viewed 3424 times
kb-74-back.jpg
kb-74-back.jpg (546.05 KiB) Viewed 3424 times
The legends on the side give away that this isn't some space communications gizmo from a sci-fi B movie, but a programmable LED sign.

It connected to the sign with an RJ 4P4C. The PCB shows that only three of the signals are connected.
kb-74-top.jpg
kb-74-top.jpg (995.27 KiB) Viewed 3424 times
kb-74-bottom.jpg
kb-74-bottom.jpg (842.54 KiB) Viewed 3424 times
The case cutout for the connector looks like it was done by hand with a rotary tool. And there's a ferrite bobbin bodged on.

There is a 5V regulator, so the input voltage can be anything in the 9-30V range. Interestingly, the controller is a Philips 87C751. The scan circuitry has a one-shot and a voltage comparator, which suggests some kind of key sense rather than a straight on-off switch. This seems to also be confirmed by the switches having more than two connectors.

I don't recognize the make of these switches from the housing or the stem.
kb-74-side.jpg
kb-74-side.jpg (755.42 KiB) Viewed 3424 times
kb-74-switch-1.jpg
kb-74-switch-1.jpg (1.38 MiB) Viewed 3424 times
kb-74-switch-2.jpg
kb-74-switch-2.jpg (269.85 KiB) Viewed 3424 times
kb-74-switch-3.jpg
kb-74-switch-3.jpg (199.78 KiB) Viewed 3424 times
As might be expected, though, with only one data line, it's serial ASCII at 5V TTL level. Alpha Lock happens locally. But the scope shows that it's idle low.

For the converter, when it's serial ASCII already, the default is to use a cp2102. But what about the inverted polarity? I could use a 5V tolerant ARM Cortex microcontroller whose UART can handle it. But there's no real software needed. So, instead I dug around in the parts drawer and pulled out a 74-series inverter and hacked this up.
kb-74-converter.jpg
kb-74-converter.jpg (445.04 KiB) Viewed 3424 times

MMcM

03 May 2021, 06:25

This Maxi-Switch 870056 has some kind of rubber dome switches and printed legends.
Maxi-Switch-870056-top.jpg
Maxi-Switch-870056-top.jpg (1.21 MiB) Viewed 3349 times
There are randomly stepped keys to confirm an 80's vintage. Likewise it has both Shift and Caps Lock keys.

Somewhat unusually the components, including some MCS-48 controller, are on the underside.
Maxi-Switch-870056-bottom.jpg
Maxi-Switch-870056-bottom.jpg (1.24 MiB) Viewed 3349 times
What attracted me were the legends themselves. Who hasn't wanted a Don't Care key at some point?

On the front of the number keys are abbreviations for some '70s link-level network protocols, so I assume it was part of some kind of signal analysis tool.
Maxi-Switch-870056-front-2.jpg
Maxi-Switch-870056-front-2.jpg (304.84 KiB) Viewed 3349 times
There are all the ASCII control characters on their respective letter keys. Except instead of the standard, which are a mix of two- and three-letter abbreviations, the designer made everything just two. For example, ^G BEL is BL and ^[ ESC is EC.

It has a 6P6C RJ jack. That and the seven keys with LEDs inside had me thinking that it would be bidirectional. But, in fact, there are two wires for the 5V power, separate signal and chassis grounds, a data out line, and, finally, reset. It's just 1200 baud ASCII. All the LED handling is on the board. There's really no reason not to just tie the RESET line to GND (it goes through an inverter before the MCU's pin 4); unplugging and plugging back in is good enough to restore the keyboard to its default state.
Maxi-Switch-870056-converter.jpg
Maxi-Switch-870056-converter.jpg (244.29 KiB) Viewed 3122 times
But back to the ASCII control codes. ESC, FS, and GS are where you'd expect. RS would normally be ^^, but that in fact ignores the Ctrl shift. Putting it on ~ still kind-of works. US would be ^_, but again that's avoided. Instead it goes on ' ": easy enough for the controller, but not explainable by bit masking. Which leaves NUL. Again, not ^@. Nor space, since that could be confusing. It could have been `, but that key was just used for the other possibility. In the end, it just gets its own Nul key, which does nothing else besides sending a zero byte. So too, Del, which is even stepped. But that's likely to have actually done something in the interface.

F1-F6 and the pink keys send unique codes with the high bit set. The Shift and Ctrl shifts do not change the code, even for the ones with front legends. There are only three exceptions: Insert Line Del is 8B, shifted 9B and Insert Char Del is 8A, shifted 9A, and Mask | CRC is 82, shifted B2. The Halt and Run LEDs are exclusive: you can only switch on one of the Runs when Halt is on and Halt then turns it off and Halt back on. But they still send their code even when they don't change any display, so the receiving program had to have the same logic. The Hex LED toggles but again the same code is sent for on and off.

Which leaves one final oddity. The FL legend on ,<. There isn't any ASCII code like that. Indeed, Ctrl-, sends A0, as though it were F0.
Last edited by MMcM on 16 May 2021, 19:12, edited 1 time in total.

MMcM

15 May 2021, 23:45

A Magnavox VideoWriter 450 keyboard.
Magnavox-VideoWriter-450-case.jpg
Magnavox-VideoWriter-450-case.jpg (366.37 KiB) Viewed 3160 times
Magnavox-VideoWriter-450-back.jpg
Magnavox-VideoWriter-450-back.jpg (187.65 KiB) Viewed 3160 times
It has Mitsumi rubber dome switches and an 8049 controller.
Magnavox-VideoWriter-450-bottom.jpg
Magnavox-VideoWriter-450-bottom.jpg (351.98 KiB) Viewed 3160 times
The protocol appears to be the same as for the earlier VideoWriter, as described here. 9600 baud serial ASCII. The 4P4C RJ connector has the colors in a different order from telephones.

A trivial converter.
Magnavox-VideoWriter-450-converter.jpg
Magnavox-VideoWriter-450-converter.jpg (205.63 KiB) Viewed 3160 times
The fourth signal is RESET, which can just be wired to ground.

As so often happens, there are still a few quirks. Mildly interesting is that all the function keys send codes with the high bit set, even TAB, BACK SPACE, and RETURN. Also most function keys send a different code if Shift is pressed, and often this code is one greater than the unshifted code.

But even more interesting is what CAPS LOCK does. It is indeed a physically locking key. But it activates before engaging the locking mechanism and so can be used as an ordinary shifting key with a little care. When pressed, it sends code 90 and when released 91. This is the only key up code the keyboard sends. But even weirder is that this is, in fact, a CTRL key. CAPS LOCK A doesn't send 41, but rather 01. Now I am interested to know whether the older VideoWriter keyboards did that, too.

MMcM

21 Jun 2021, 03:58

A Sony KI-105NE.
Sony-KI-105NE-case.jpg
Sony-KI-105NE-case.jpg (367.34 KiB) Viewed 2642 times
Sony-KI-105NE-back.jpg
Sony-KI-105NE-back.jpg (220.18 KiB) Viewed 2642 times
A nice looking medium-sized keyboard from the mid-80s. It's hard to capture in a photo, but the eighteen F keys are pale green on gray. The telephone-style numpad is simple. I imagine the arrow placement takes some getting used to.

It has Alps switches and an MCS-48 controller. There is no voltage regulator: it takes 5VDC straight from the computer. No LEDs or other requirement for communication to the keyboard.
Sony-KI-105NE-top.jpg
Sony-KI-105NE-top.jpg (460.94 KiB) Viewed 2642 times
Sony-KI-105NE-bottom.jpg
Sony-KI-105NE-bottom.jpg (566.2 KiB) Viewed 2642 times
The DIN-6 connector gave some faint hope that it would be a protocol that could be turned into a USB keyboard. Turns out there are only 5 connections (position is 4 not connected). And only 4 signals (1 and 6 are both ground). And the extra one is for the RESET button.

In the end, the DATA line is just 1200 baud ASCII. So not worth an MCU as opposed to a TTL-to-USB serial converter. The recessed RESET button, which would have allowed using a Pro Micro or other board without one of its own, doesn't do anything in this configuration.
Sony-KI-105NE-converter-2.jpg
Sony-KI-105NE-converter-2.jpg (269.86 KiB) Viewed 2642 times
The currency key sends $ on this board. I imagine a slightly different ROM would give £ or ¥.

The non-ASCII function keys send codes with the eighth bit set. Some change with each shift: A is 61, SHIFT-A 41, CODE-A E1, SHIFT-CODE-A also 61, CTRL-A (and CTRL-SHIFT-A) 01, CTRL-CODE-A (and CTRL-SHIFT-CODE-A) 81. Some do not change: LEFT, RIGHT, DOWN, UP, ENTER are 88, 89, 8A, 8B, 8D. Some respect some shifts: CLR/HOME is 9E, SHIFT- or CTRL- is 8C. Number 0-9 are B0-B9, CTRL- 90-99. * # are AA, A3, CTRL- 9A, 9B. There is evidently some attempt to avoid collisions. F1-F16 are E0-EF. SHIFT-F1-F16 are F0-FF. CTRL-F1-F8 are 80-88, and CTRL-F15-F16 8E-8F. But CTRL-F9 is 8F, CTRL-F10 9C, CTRL-F11 9D, CTRL-F12 9F, CTRL-F13 EF, CTRL-F14 FF. Then F17, F18 are 9C, 9D, SHIFT- and CTRL- 9E, 9F. So F17 and CTRL-F10 are the same. Or CTRL-CODE-A and CTRL-F2. In short, yet another reason why it would be hard to reverse into a keyboard.

Post Reply

Return to “Workshop”