IBM PC Keyboard ConverterThe converter translates IBM PC keyboard protocols into USB to use classic keyboards with modern computer. It supports both IBM XT and AT protocols(including PS/2 and Terminal), and all of scan code set 1, 2 and 3 with one firmware.
Pin configuration is compatible for Soarer's, this firmaware works on existent Soarer's converter hardwares.
This project is intended to integrate and supersede existent TMK XT, PS/2 and Terminal converters.
- IBM XT converter:
https://geekhack.org/index.php?topic=94649.0- PS/2 converter:
https://geekhack.org/index.php?topic=14618.0- IBM Terminal converter:
http://geekhack.org/index.php?topic=27272.0You can buy preassembled TMK converter here to support this project.Thanks
Trouble ShootCheck these first if you have a problem.
- Check your wiring 100 times if you are using your own DIY converter
- Pull-up resistors
- Reset pin(for XT keyboards)
- Use TMK 'Default Prebuilt Firmware'
Update2023-10-27 Add
support for hot keys of Silitek SK-7100P
2023-06-16 Add
support for 'TERM FUNC' key on Siemens F500 in AT protocol
2023-02-17 Fix for
XT startup problem2022-09-08 Add support for
SIEMENS PCD 2 Keyboard. Make
'Magic commands' enabled again.
2022-08-20
Fix keymap editor layout for Full-key: All hidden keys of IBM Model-M are supported now
2022-07-22 Confirm support and fix for
IBM 5576-0022021-11-08 Add support for
AX keyboard2021-11-06 Add
support for
Televideo DEC style keyboard2021-10-28
Update: Add AT/XT auto-switching support, parity error detection, ConnectPro KVM support
2021-08-17 Fix
XT keymap for ISO key.
2021-07-07 Add support for secondary interface and PS/2 Mouse(IntelliMouse, ExplorerMouse and Logitech PS/2++ too)
2021-06-03 Add support for Zenith Z-150 AT, IBM 5576-001(ID:AB92) and IBM 1394204(ID:7F7F)
2020-11-22 Add adhoc Z-150 AT support(Let me know your result)
2020-11-22 Fix
Pause key for enhanced XT keyboard
2020-07-05 Fix for
Timeout error(ERR:20)2020-07-02 Add support for hidden keys of IBM AT 84-key to Editor
2020-06-03 Improvement for XT protocol and keyboard error recovery
2020-05-11 Add handler for keyboard buffer full to prevent key stuck
2020-05-11 Add adhoc start bit error recovery for XT keyboards
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
REQUEST FOR HELPTest in the field and feedback from users are needed to improve this converter.
Please report your result and your keyboard model number.Also debug outputs on hid_listen would be helpful to know how keyboard is recognized.The converter needs to be tested especially with these keyboards:
-
IBM 5576-002/003 - Please report your result. Also check
this and
Code Set 2 table.
-
Copam K-430 (supported now)
-
IBM 5576-001 Supported now! 2021-06-01
-
Zenith Z-150 AT (supported now)
-
Zenith Z-150 XT black label (supported now)
-
IBM PC XT 83-key (supported now)
-
IBM PC AT 84-key (supported now)
-
IBM RT to add
LED support (Let me know if you still have any issue)
Keyboard support-
PC XT (keyboard of IBM 5150 5160)
- 83-key: 1501100 1501105
-
PC AT (keyboard of IBM 5170)
- 84-key: 6450200 6450225
-
PC Terminal (keyboard of IBM 5271/3270 PC)
- 122-key: 6110344 6110345 1397000
- 102-key: 1390680 1395764 1392595
- Other compatible keyboards (see below)
Confirmed KeyboardsLet me know if you find any issue with these keyboards using the latest firmware.
XT Keyboards- IBM PC XT 83-key:
4584656,
2020-06-02,
2023-02-17-
Leading Edge DC-2014-
KeyTronic E03600 XT/AT (after Timeout error Fix)
-
Zenith Z-150 XT,
black label,
Heath(92-803)-
Chicony KB-5191 in XT mode-
Focus FK-2001-
Siemens F500 XT(2020-11)-
Sanyo N860-2905-
Commodore G80-0560/e (
PC-5/PC-10)
AT(PS/2) Keyboards-
IBM PC AT 84-key,
-
DS-2001,
-
Northgate Omnikey-
KeyTronic E03600 XT/AT-
DTK SPK 101-
FK-8000-
Focus FK-2001-
Siemens S26381-K257-L120 (
Some keys may be not useful.)
-
SIEMENS PCD 2 Keyboard (
Weirdness)
-
APC-H410E-
Toshiba JIS AT101-
Dell AT101 - GYI3PVAT101 -
Wang 724-
Unicomp Model M-
IBM P70 Keyboard-
Zenith Z-150 AT #661 OK- Focus FK-2002
-
AX keyboard (Refer to
mapping)
-
Tandberg TDV 5020 (Refer to
mapping)
-
IBM 5576-002-
Siemens F500 AT(2023-06)-
Unknown DEC compatible with MiniDIN-6P-
Silitek SK-7100PTerminal Keyboards- IBM 122-key Terminal:
6110345,
6111070,
6110344, 1390702(Model M)
- Cherry
G80-
2551-
IBM 5576-001-
IBM 1394204 101-key (Use 122-key layout on Keymap Editor and see
this for mapping.)
-
Televideo DEC style (Use Full-key layout on Keymap Editor and see
this for mapping.)
-
IBM RT should work. (Use 122-key layout on Keymap Editor and see
this for mapping.) - No LED support yet. See 'REQUEST FOR HELP' above and help me.
AT/XT Keyboards-
RT8255c+-
RT-101+-
C260 Enhanced Keyboard (Deyi foam and foil)-
Northgate Omnikey 101-
Zenith ZKB-2-
BTC-5161 - Part number: BTC5339 (AT/XT Auto-Switch, works as
AT)
-
NTC KB-6252EA-
Copam K-430 (AT/XT Auto-Switch, works as
AT)
Keymap EditorYou can edit keymap on web browser and download the latest prebuilt firmware here.
http://www.tmk-kbd.com/tmk_keyboard/editor/#ibmpc_usbFlashCheck this about how to flash firmware.
https://github.com/tmk/tmk_keyboard/wiki#flash-firmwareFirmwareSource code:
https://github.com/tmk/tmk_keyboard/tree/masterSee project README also.
https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usbDefault Prebuilt FirmwareYou can download the latest prebuilt firmware with default keymap here.
https://github.com/tmk/tmk_keyboard/tree/master/converter/ibmpc_usb/binaryBuild FirmwareIf you are not familiar to these things use Keymap Editor.
git clone https://github.com/tmk/tmk_keyboard.git
cd converter/ibmpc_usb
make -f Makefile.<variant> clean
make -f Makefile.<variant>
where <variant> is atmega32u2, atmega32u4 or at90usb1286.
You will see firmware hex file in the directory.
Check this page as well.
https://github.com/tmk/tmk_keyboard/wiki#build-firmwareBuild Options:These options in Makefile makes firmware size lager and you can disable these to reduce its size.
- `IBMPC_SECONDARY` - enables secondary interface for converter with PS/2 Mini-DIN-6 connector
- `IBMPC_MOUSE_ENABLE` - enables PS/2 mouse support
Converter HardwareThe firmware supports ATmega32u4, ATmega32u2, AT90USB1286 by default, Teensy2/2++ or Pro Micro can be used.
WiringWire controller pins below to keyboard signals, besides VCC and GND.
This pin configuration is compatible for Soarer's converter.Pull-up resistors of 1-4.7K Ohm on both Data and Clock line are
needed absolutely, without them it won't work in some cases.
-
Data PD0-
Clock PD1-
Reset PB7(or
PB6 for Pro Micro)
Optional secondary interface for PS/2 connector uses these pins.
-
Data2 PD2-
Clock2 PD3See
this wiki for pull-up resistor.
Connector pinoutsMore
Reset pin (for XT)
Old Type-1 IBM XT keyboards need Reset pin to initialize its controller on startup. Also some clones such as Zenith Z-150 XT and Leading Edge DC-2014 are known to need it. Type-2 IBM XT keyboard and other XT clones don't need.
You should have wiring for the Reset pin if you want to support all of XT keyobards.
See
this and
this for difference between XT Type-1 and Type-2. It is difficult to discriminate between Type-1 and Type-2 without looking into its internal electronics.
AT, PS/2 and Terminal keyboards don't require the pin. But it won't harm for the keyboards so you can make converter compatible with XT, AT, PS/2 and Terminal keyboards safely with having the Reset pin.
Pro Micro CaveatPro Micro is not recommended unless you are already familiar or have skill and time enough.Don't ask Pro Micro specific question/help here like which pins to be used and how to flash.
More
You have to use VCC pin to power your keyboard, not RAW pin.
RAW pin is not for 5V power supply directly from USB line. The name may be confusing but it is used for external power input, not output. You get only around 4.6V due to protection diode(D2 in schematic) forward voltage drop(0.4V typically) on RAW pin.
And you have to make J1 solder bridged, without this you will get same voltage as RAW pin or lower.
With J1 solder bridge you can get raw power(possibly 5V) directly from USB line on VCC pin. Note that RAW pin doesn't give 5V even with the solder bridge.
Check this wiki for detail.
https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#j1-solder-bridgePD0, PD1 and PB6 are maked on Pro Micro PCB as 3, 2 and 10 respectively.
https://github.com/tmk/tmk_keyboard/wiki/Pro-Micro#pinout DebugUse hid_listen to see debug outputs from the converter.
https://github.com/tmk/tmk_keyboard/wiki#debugYou will see debug ouputs like this.
TMK:95aba6dd/LUFA
USB configured.
Keyboard start.
rAA rBF rBF wF5 rFA wF2 rFA rBF rBF wF4 rFA ID: BFBF
kbd: Terminal
wF8 rFA
Scan Code Maphttps://github.com/tmk/tmk_keyboard/wiki/IBM-PC-Keyboard-Converter#default-mappingCheck this default mapping if your keyboard is not consistent with keymapping code or Keymap Editor layout.
Use hid_listen to see scan code of questioned key and find it in the default mapping table.
Sigrok DecoderYou can use this protocol deocoder with sigrok PulseView to see commands and data for debug. The docoder supports only AT protocol, not XT at this time.
More
Cheap $10-20 logic analyzer that is compatible with
sigrok works well for this job. Get one and try. 1MHz sample rate is actually good enough for the protocol.
https://github.com/tmk/tmk_keyboard/wiki/Signal-Capture-for-debug#sigrokOr instead of using logic analyzer you can use 'Signal Capture' firmware on your converter hardware to capture signal(this won't always work). See below.
Signal Capture FirmwareWith this firmware you can capture signals from keyboards without logic analzyer.
https://github.com/tmk/tmk_keyboard/wiki/Signal-Capture-for-debug/#signal-capture-firmwareIssuesLet me know here or on github if you have any problem.
https://github.com/tmk/tmk_keyboard/issuesMedia keys supportMedia keys are mapped to F13-F24 by default. You can remap on Keymap Editor.
Check this wiki entry.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-Keyboard-Converter#media-keysMouse supportDefault firmware is built with Mouse support. Just plug mouse to PS/2 converter or AT/XT converter using adapter.
-
PS/2 mouse protocols are also supported now. 2021-08
- Default mouse - 3-button
- IntelliMouse - 3-button with v-wheel
- ExplorerMouse - 5-button with v-wheel
- Logitech PS/2++ - 8-button with v and h-wheel
Confirmed Mouses- Logitech MX510
Dual device supportSupported only by
PS/2 converter. To use secondary interface you need
Y-splitter cable.
You can host two devices at same time regardless of any combination(keyboard/mouse, 2 keyboards or 2 mouses).
AT/XT protocol auto-switching keyboardSome keyboards support both AT and XT protocol and can detect host protocol automatically without physical switch. TMK IBMPC converter selects AT protocol in preference to XT with such keyboards.
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-Keyboard-Converter#atxt-auto-switchingConverter Implementation and Protocol ConsiderationsCheck TMK wiki pages.
-
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-Keyboard-Converter-
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol-
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-AT-Keyboard-ProtocolSolved Issues:More