IBM LPFK on a Serial Port

IBM LPFK 6094-020

This is an IBM Lighted Program Function Keyboard (LPFK) Model number 6094-020. It was used as an extra input device when doing computer aided design on the IBM RS/6000 series of machines. It connected to the machine by a special port or by the serial port. IBM also made an attachment kit so that you could connect it to the serial port of a generic PC.

The LPFK consists of 32 keys each with an LED indicator. The LED indicator can be turned on and off by program control. Each time a key is pressed a byte is sent to the host machine to tell it what key was pressed. The lights have to be set from the host machine - there is no automatic mode that turns the lights on and off when keys are pressed.

Internally the LPFK is driven by an Intel 8051 microcontroller. The circuitry and the lights pull too much power for a serial port so the LPFK is powered by an external AC to DC 'wall wart' that provides up to 500 milliamps at 5V. They could also be powered directly from the RS/6000 on the special port, or by a special cable from an IBM 6091 monitor.

Now for the fun part - here is how to make it talk when connected to a serial port.

Protocol: 9600 bps, Odd parity, 8 data bits, 1 stop bit. No handshaking (hardware or software) is required.

Commands: (All commands are shown in hex)

0x01 Reset Similar to the power on reset. Leaves the LPFK in the 'disabled' state with all indicators off.
0x06 Read Configuration Upon getting this byte the LPFK responds with 0x03. Helpful for determining if the LPFK is active on a serial port.
0x08 Enable Tells the LPFK that it may process and send keystroke data to the host machine.
0x09 Disable Keyboard input is disabled. The LPFK will still respond to Reset and Read Configuration
0x94 Set Indicators This command is followed by four more bytes which is a bitmap that represents the indicator lights on the keys. If the bit for a key is turned on, the light will be turned on. If the bit for a key is 0, the light will be turned off. Keys are numbered from 0 to 31.

Responses from the LPFK:

0x00 to 0x1f Keystroke The corresponding key on the LPFK was hit. These responses are only sent when the LPFK has been enabled using the Enable command.
0x80 Retransmit The LPFK sends this if there was an error on the last Set Indicators command and it wants the host machine to retransmit it.
0x81 Ok The LPFK sends this if the last Set Indicators command was received successfully.

Need a template to define your keys?

The LPFK was designed to be used with templates that would define the keys depending upon which application was in use. If you want to make your own templates, save the image to the left, print it out, and cut out the key holes. (The image shown here is scaled down, but if you save the image you will get the full size version that is properly sized for the LPFK.)



Credits:

Thanks to a very special source where I work who had an ancient CD that had these command descriptions in it. I had been trying to make the LPFK talk on a serial port on and off for a year and was not making much progress. Recently I had stumbled on the Reset and Read Configuration commands, but it was slow and painful ..



Created August 19th, 2008, Last updated August 20th, 2008
(C)opyright Michael B. Brutman, mbbrutman at gmail.com