HP-HIL
Posted: 25 May 2020, 04:44
For a change, I decided that rather than reverse engineering something that would ultimately turn out to be a simple protocol with funny voltages, I would have a go at something well documented but complicated: HP-HIL.
This is a multi-device protocol, so like USB. But in a daisy-chain, so even more like ADB. There are four wires, 12VDC, ground, transmit, and receive, which are known as SO and SI, respectively. Devices capable of being in the middle of the chain have two ports.
The connectors are AMP SDL, keyed two different ways ways, A and E, for the downstream and upstream from the host, respectively. So, a converter taking its place at the head needs some E receptacles. The part numbers given in the technical reference start with 1- and 5- (get it?). Digi-Key stocks some 4-conductor SDL jacks, made by AMP's sucessor's successor, TE Connectivity's, AMP division. And although the part numbers don't match, they come keyed two different ways and the datasheet says they will have a keying letter printed inside. So, 5's will probably work. And, indeed, they have E embossed deep in there. And, more importantly, fit the end of an HP-HIL cable with two dots.
At root, the protocol is just TTL-level serial. Even though the power line is 12V, every device is 5V and does nothing with it other than regulate it down. Maybe the potential of voltage drop over the whole chain was a concern. Or maybe 12V is just what they had coming out of the power supply.
Except that each "frame" is 15-bits long instead of 10: start bit, three-bit address (so, up to seven devices with one broadcast address; ADB allowed up to sixteen devices), a command vs. data bit, eight bits of data, and parity and stop bits. So, there is no question of using even the more advanced MCU UARTs. Each bit is 10µs wide, so bit-banging is probably doable by a ATMega32U4 Teensy.
There are photos, including the insides, of various devices online at Bitsavers, so I won't bother taking any of the particular ones I used to debug.
The result uses QMK and is available here.
The keyboard to which I had access is rubber dome. Not bad as rubber dome goes, I suppose. And the purple and green dye-sub legends do reenforce a later '80s vibe. There are apparently also versions of the 46021A that use Fujitsu leaf-spring switches. But there does not seem to be any way to tell from the outside which is which. Which, together with eBay' sellers', uhm, expansive ideas of what consitututes "clicky," means I am not sure how I would set out to get one. Perhaps the older 46010A is more reliably Fujitsu? There are also 46021B and 46021C, which make all the arrow keys outlines and not just home. I think maybe those are always rubber dome. Anyway, I have something good enough for testing the mapping and typing at speed.
There are two- and three-button mice, and a three-button trackball. They all work more or less the same way with a rolling ball. And so aren't of much interest except as retro-computing. But I was able to get them functioning okay with QMK.
Of potentially more interest even today is a 32-key macropad, err, "48086A 32-button Control Box." These came with thin plastic templates on which one could pencil what the buttons did. It also has a green LED in the upper-right corner, wired to HIL's prompt / acknowledge commands. I made this controlled by QMK's backlight function. So, if one wanted to assign a layer toggle with backlight when activated (a standard QMK trick), that would be 62 macros to program.
48084A ID Modules, that is, node licensing dongles, just return their (unique) serial number when queried. All devices have the optional ability to respond to this "security code report" query, so in some sense an ID module is just a device with nothing other than its serial number. But, as far as I can tell, no other device actually has the serial number programmed in (which would be expensive and for what). They either don't claim support or do and return all zeros in the query response. I didn't come up with anything useful to do with this, though. So I just added a "magic" QMK command to print them out to hidlisten.
The speaker device, 46081A HIL Audio Extension, does not seem to be an active device at all. The photo on Bitsavers of the inside just shows a NAND gate and some passives. No MLC chip to talk the HIL protocol and no timer or anything to make beeps. It has a mini phono plug input. Am I missing something? Or is it just using the 12VDC to power a simple audio amplifier? Like USB-Powered PC Computer Speakers, which aren't really USB audio devices?
I was not able to scare up access to any control dial devices, which evidently used optical rotary encoders. So they won't work like the ones on custom keyboards today. These came in two versions: "46083A HP-HIL Knob," one giant dial in its own box; and "46085A Control Dial Module," a tic-tac-toe matrix, which might possibly not be as silly as it looks in this '80s "office" photo shoot. The timing of the code isn't perfect: there are occasional framing and parity errors (reported in debug mode). But the protocol design is quite robust for recovering from these, without even losing events most of the time. Both the sent and received frames look to accord with the spec pretty closely. So I think the problem is not starting the bit scanning loop from the interrupt all the time reliably. When I put a converter in its own case, I usually go with the Hammond ABS project boxes. And the black ones. But, in this case, I tried as best I could with what I had at hand to recreate the aesthetic of having all these little beige HIL boxes on your desk.
This is a multi-device protocol, so like USB. But in a daisy-chain, so even more like ADB. There are four wires, 12VDC, ground, transmit, and receive, which are known as SO and SI, respectively. Devices capable of being in the middle of the chain have two ports.
The connectors are AMP SDL, keyed two different ways ways, A and E, for the downstream and upstream from the host, respectively. So, a converter taking its place at the head needs some E receptacles. The part numbers given in the technical reference start with 1- and 5- (get it?). Digi-Key stocks some 4-conductor SDL jacks, made by AMP's sucessor's successor, TE Connectivity's, AMP division. And although the part numbers don't match, they come keyed two different ways and the datasheet says they will have a keying letter printed inside. So, 5's will probably work. And, indeed, they have E embossed deep in there. And, more importantly, fit the end of an HP-HIL cable with two dots.
At root, the protocol is just TTL-level serial. Even though the power line is 12V, every device is 5V and does nothing with it other than regulate it down. Maybe the potential of voltage drop over the whole chain was a concern. Or maybe 12V is just what they had coming out of the power supply.
Except that each "frame" is 15-bits long instead of 10: start bit, three-bit address (so, up to seven devices with one broadcast address; ADB allowed up to sixteen devices), a command vs. data bit, eight bits of data, and parity and stop bits. So, there is no question of using even the more advanced MCU UARTs. Each bit is 10µs wide, so bit-banging is probably doable by a ATMega32U4 Teensy.
There are photos, including the insides, of various devices online at Bitsavers, so I won't bother taking any of the particular ones I used to debug.
The result uses QMK and is available here.
The keyboard to which I had access is rubber dome. Not bad as rubber dome goes, I suppose. And the purple and green dye-sub legends do reenforce a later '80s vibe. There are apparently also versions of the 46021A that use Fujitsu leaf-spring switches. But there does not seem to be any way to tell from the outside which is which. Which, together with eBay' sellers', uhm, expansive ideas of what consitututes "clicky," means I am not sure how I would set out to get one. Perhaps the older 46010A is more reliably Fujitsu? There are also 46021B and 46021C, which make all the arrow keys outlines and not just home. I think maybe those are always rubber dome. Anyway, I have something good enough for testing the mapping and typing at speed.
There are two- and three-button mice, and a three-button trackball. They all work more or less the same way with a rolling ball. And so aren't of much interest except as retro-computing. But I was able to get them functioning okay with QMK.
Of potentially more interest even today is a 32-key macropad, err, "48086A 32-button Control Box." These came with thin plastic templates on which one could pencil what the buttons did. It also has a green LED in the upper-right corner, wired to HIL's prompt / acknowledge commands. I made this controlled by QMK's backlight function. So, if one wanted to assign a layer toggle with backlight when activated (a standard QMK trick), that would be 62 macros to program.
48084A ID Modules, that is, node licensing dongles, just return their (unique) serial number when queried. All devices have the optional ability to respond to this "security code report" query, so in some sense an ID module is just a device with nothing other than its serial number. But, as far as I can tell, no other device actually has the serial number programmed in (which would be expensive and for what). They either don't claim support or do and return all zeros in the query response. I didn't come up with anything useful to do with this, though. So I just added a "magic" QMK command to print them out to hidlisten.
The speaker device, 46081A HIL Audio Extension, does not seem to be an active device at all. The photo on Bitsavers of the inside just shows a NAND gate and some passives. No MLC chip to talk the HIL protocol and no timer or anything to make beeps. It has a mini phono plug input. Am I missing something? Or is it just using the 12VDC to power a simple audio amplifier? Like USB-Powered PC Computer Speakers, which aren't really USB audio devices?
I was not able to scare up access to any control dial devices, which evidently used optical rotary encoders. So they won't work like the ones on custom keyboards today. These came in two versions: "46083A HP-HIL Knob," one giant dial in its own box; and "46085A Control Dial Module," a tic-tac-toe matrix, which might possibly not be as silly as it looks in this '80s "office" photo shoot. The timing of the code isn't perfect: there are occasional framing and parity errors (reported in debug mode). But the protocol design is quite robust for recovering from these, without even losing events most of the time. Both the sent and received frames look to accord with the spec pretty closely. So I think the problem is not starting the bit scanning loop from the interrupt all the time reliably. When I put a converter in its own case, I usually go with the Hammond ABS project boxes. And the black ones. But, in this case, I tried as best I could with what I had at hand to recreate the aesthetic of having all these little beige HIL boxes on your desk.