TMK IBM PC Keyboard Converter
Posted: 05 Dec 2019, 01:11
IBM PC Keyboard Converter
The converter translates IBM PC keyboard protocols to plug classic keyboards into modern computer with USB ports. It supports both IBM XT and AT protocols, and all of scan code set 1, 2 and 3 with one firmware.
Also check this corresponding thread at geekhack.org.
https://geekhack.org/index.php?topic=103648.0
REQUEST FOR HELP:
Try prebuilt firmware below and report your result, please.
Post your keyboard model number here, also debug outputs on hid_listen would be helpful.
The converter need to be tested with keyboards below particularly, as of 2020-03-24.
- IBM PC XT 83-key
- IBM PC AT 84-key
- Zenith Z-150 XT black label
- Zenith Z-150 AT beige label
Update
2020-04-28 Add support G80-2551 and possibly other terminal keyboards(whose id is AB86)
2020-04-11 Keymap Editor is available
2020-03-02 firmware update for XT protocol handling and many other fixes
Hardware
Firmware supports ATMega32u4 by default, Teensy2/2++ or ProMicro can be used.
Wire controller pins below to keyboard signals, besides VCC and GND. This is compatible for Soarer's converter.
- Data: PD0
- Clock: PD1
- Reset: PB6 or PB7 (For some of XT keyboards. Not needed for AT, PS/2 and Terminal)
Pull up resistors of 1-4.7K Ohm on both Data and Clock line are recommended, without them it won't work in some cases.
Reset
Old Type-1 IBM XT keyboard and some of XT clones need this to reset its controller on startup. Many of IBM XT keyboards available are Type-2 and don't need the reset pin.
See this for Type-1 vs Type-2:
https://vintagecomputer.ca/ibm-pc-model ... vs-type-2/
As for clones Zenith Z-150 XT and Leading Edge DC-2014 are known to need this.
Connector pinouts
XT
- http://www.kbdbabel.org/conn/kbd_connector_ibmpc.png
- https://allpinouts.org/pinouts/connecto ... -xt-5-pin/
AT
- http://www.kbdbabel.org/conn/kbd_connector_ps2.png
- https://old.pinouts.ru/InputCables/Keyb ... nout.shtml
PS/2
- https://pinouts.ru/InputCables/KeyboardPC6_pinout.shtml
Terminal
- http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
- http://www.kbdbabel.org/conn/kbd_connec ... x_319x.png
Keymap Editor
You can edit keymap and download firmware here.
http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb
Default Prebuilt Firmware
You can usually download fimware from Keymap Edior above.
Use this default firmware when you are in trouble.
https://github.com/tmk/tmk_keyboard/tre ... usb/binary
Build Firmware
Download source code from: https://github.com/tmk/tmk_keyboard/tre ... /ibmpc_usb
$ cd converter/ibmpc_usb
$ make clean
$ make
Debug
Use hid_listen to see debug outputs from the converter.
https://www.pjrc.com/teensy/hid_listen.html
The converter translates IBM PC keyboard protocols to plug classic keyboards into modern computer with USB ports. It supports both IBM XT and AT protocols, and all of scan code set 1, 2 and 3 with one firmware.
Also check this corresponding thread at geekhack.org.
https://geekhack.org/index.php?topic=103648.0
REQUEST FOR HELP:
Try prebuilt firmware below and report your result, please.
Post your keyboard model number here, also debug outputs on hid_listen would be helpful.
The converter need to be tested with keyboards below particularly, as of 2020-03-24.
- IBM PC XT 83-key
- IBM PC AT 84-key
- Zenith Z-150 XT black label
- Zenith Z-150 AT beige label
Update
2020-04-28 Add support G80-2551 and possibly other terminal keyboards(whose id is AB86)
2020-04-11 Keymap Editor is available
2020-03-02 firmware update for XT protocol handling and many other fixes
Hardware
Firmware supports ATMega32u4 by default, Teensy2/2++ or ProMicro can be used.
Wire controller pins below to keyboard signals, besides VCC and GND. This is compatible for Soarer's converter.
- Data: PD0
- Clock: PD1
- Reset: PB6 or PB7 (For some of XT keyboards. Not needed for AT, PS/2 and Terminal)
Pull up resistors of 1-4.7K Ohm on both Data and Clock line are recommended, without them it won't work in some cases.
Reset
Old Type-1 IBM XT keyboard and some of XT clones need this to reset its controller on startup. Many of IBM XT keyboards available are Type-2 and don't need the reset pin.
See this for Type-1 vs Type-2:
https://vintagecomputer.ca/ibm-pc-model ... vs-type-2/
As for clones Zenith Z-150 XT and Leading Edge DC-2014 are known to need this.
Connector pinouts
XT
- http://www.kbdbabel.org/conn/kbd_connector_ibmpc.png
- https://allpinouts.org/pinouts/connecto ... -xt-5-pin/
AT
- http://www.kbdbabel.org/conn/kbd_connector_ps2.png
- https://old.pinouts.ru/InputCables/Keyb ... nout.shtml
PS/2
- https://pinouts.ru/InputCables/KeyboardPC6_pinout.shtml
Terminal
- http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
- http://www.kbdbabel.org/conn/kbd_connec ... x_319x.png
Keymap Editor
You can edit keymap and download firmware here.
http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usb
Default Prebuilt Firmware
You can usually download fimware from Keymap Edior above.
Use this default firmware when you are in trouble.
https://github.com/tmk/tmk_keyboard/tre ... usb/binary
Build Firmware
Download source code from: https://github.com/tmk/tmk_keyboard/tre ... /ibmpc_usb
$ cd converter/ibmpc_usb
$ make clean
$ make
Debug
Use hid_listen to see debug outputs from the converter.
https://www.pjrc.com/teensy/hid_listen.html
Code: Select all
Waiting for new device:...
Listening:
TMK:95aba6dd/LUFA
USB configured.
Keyboard start.
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA