Convert IBM AT keyboard to USB

My great old IBM AT keyboard has the DIN 5 pin connector. Apparently, from what I have read, I need to convert the keycodes sent by the keyboard to codes compatible with the newer computers in addition to changing the cable.

Do any of you here have experience with doing this?

A Leonardo can be configured to appear as a USB keyboard. It could have a sketch uploaded to it to decode an AT keyboard. If you need to do this, that would be one way to go.

http://arduino.cc/en/Main/ArduinoBoardLeonardo

Thanks. I did find this .CPP file that converts the raw code to characters. It might be a starting point where instead of converting to characters, maybe I could convert directly to what USB needs using a micro controller in between the keyboard and the USB plug. USB keyboard specs are confusing to me so far though. http://playground.arduino.cc/PS2Keyboard/Cpp

You're probably better off with a cheap USB/PS2 "active" adapter (like http://www.ebay.com/itm/PS2-Keyboard-Mouse-to-USB-Coverter-Adapter-Splitter-/160603549063 - make sure you don't get the purely mechanical adapter that only works with keyboards that implement both USB and PS/2 internally.) And a mechanical adapter to go from DIN5 to minidin6 (like http://www.ebay.com/itm/Vintage-PC-Keyboard-Adapter-PS2-Female-to-AT-Male-NC-/291145028110?pt=US_Parallel_Serial_PS_2_Cables_Adapters&hash=item43c998920e ) It MIGHT work :-)

Keyboards communicate in keycodes rather than ascii, and the codes that a PC keyboard sends are NOT the same as those a USB keyboard sends (and neither one actually resembles the character it actually represents!)

I rolled the dice and ordered this one: http://www.ebay.com/itm/MANHATTAN-179027-USB-to-Dual-PS-2-Converter-/251489449247?_trksid=p2054897.l5665

We shall see if it works..

pegwatcher: I rolled the dice and ordered this one.

A wise choice, being in the US, though this one is somewhat cheaper - if you could wait. :D

The one "westfw" cites has an annoying problem with failing to properly initialise when the PC wakes from "sleep", though no problems on cold boot.

pegwatcher: We shall see if it works..

Oh, it will! No problems at all. {Yep, I have all three! And just for the heck of it, buying another couple now just for spares.}

The one “westfw” cites

It was just the first likely-looking result from a search; not an endorsement :slight_smile:

Since an Arduino can speak PS/2, one of these adapters is probably also a good way to connect a modern USB keyboard or mouse to an Arduino (since the arduinos that can speak directly to USB devices are rare!)

westfw: Since an Arduino can speak PS/2, one of these adapters is probably also a good way to connect a modern USB keyboard or mouse to an Arduino (since the arduinos that can speak directly to USB devices are rare!)

Wrong way round!

Wrong way round!

Drat. It must be late. What I MEANT to say was that they provide an easy way for an arduino to talk to the USB keyboard port of a modern computer without PS/2 ports. Easier that putting special code in the 16u2 chip, and perhaps easier than using a leonardo.

See: http://en.wikipedia.org/wiki/Model_M_keyboard

I have made or bought a dozen computers in the past 20 years, but I always keep my GoodOld Clickity Model M keyboards! I wish I kept another dozen of them. They're about $50 on Ebay.

I detest this mushy keyboard that came with the newer computer. I can easily type twice as fast with these sturdy old keyboards that have real buckling spring switches under the key caps because I make less mistakes.

Thanks, people, for the input.

pegwatcher: I detest this mushy keyboard that came with the newer computer. I can easily type twice as fast with these sturdy old keyboards that have real buckling spring switches under the key caps because I make less mistakes.

I imagine most people here are with you. The slightly older Dell keyboards are pretty good - viz. my previous discussion/ diversion, though at a garage sale yesterday, I saw a Dell keyboard I really would not want; low profile keys with the six cursor keys in the wrong position that fouls up navigation.

terryking228: See: http://en.wikipedia.org/wiki/Model_M_keyboard

I have made or bought a dozen computers in the past 20 years, but I always keep my GoodOld Clickity Model M keyboards! I wish I kept another dozen of them. They're about $50 on Ebay.

Seems to be a good market in computer "antiques". Whether for use, or exhibition. Either way, something in good condition can have value.