I am quite aware you can get ready made off the shelf adaptors to connect old ps/2 keyboards to USB. But I am curious as how would one do it themselves? I have tried just rewiring an old keyboard to a USB cable as they both have 5V and ground and 2 data connections. Though USB has a differential DATA +- and ps/2 has a data and clock wire.

So after trying a basic rewiring it didn't work so there has to be some conversion going on but what? The puzzling thing is going from USB to PS/2 works but going the other way doesn't work. Why?

Edit: Ok so in some more research, I think I understand the why now. As USB devices need to be registered and be able to give data to the OS about what it is when requested by the OS. ie. report back a VID and HID code. Although all the 'scan codes' that the keyboard sends to the system should still work with modern systems. As this was based on the original IBM PS/2 (AT) keyboards and this protocol has been carried though to today.

Edit 2: More info found on the electrical interface needed here. It seems its a not that easy but doable task to create your interface with the use of a cheap microcontroller. The connection between the microcontroller and the ps/2 keyboard seems straight forward enough but then from the microcontroller to USB is another story...

Edit 3: After a bit more searching I discovered that Microchip released a Technical Brief with quite a complete guide on how to do exactly what I was after! Its TB055 and includes the source code for PIC uC.

enter image description here

  • 2
    \$\begingroup\$ In both directions you need to have some chip that converts the protocols, they are inherently incompatible. \$\endgroup\$ – PlasmaHH Dec 2 '16 at 10:50
  • \$\begingroup\$ @PlasmaHH thanks but thats exactly my question I would like to know how? \$\endgroup\$ – crowie Dec 2 '16 at 10:52
  • 3
    \$\begingroup\$ with a chip that converts the protocols \$\endgroup\$ – PlasmaHH Dec 2 '16 at 10:53
  • \$\begingroup\$ Not sure why the down votes, is there a problem with my question? \$\endgroup\$ – crowie Dec 2 '16 at 11:54

The converters like these:

enter image description here

are just for the connections.

It will not make a USB-only keyboard work in PS/2.

It will not make a PS/2-only keyboard work on USB.

The keyboard that came with such an adapter was capable of both USB and PS/2 connections. It detects if it is plugged into a USB port or a PS/2 port and then adapts to that connection type.

  • 2
    \$\begingroup\$ to whoever -1 this: please provide an explanation so we can all learn something. \$\endgroup\$ – Bimpelrekkie Dec 2 '16 at 10:55
  • \$\begingroup\$ @FakeMoustache: My guess is that it only adresses half of the question, not the real interesting part for the OP: how to actually make it work. \$\endgroup\$ – PlasmaHH Dec 2 '16 at 11:03
  • 2
    \$\begingroup\$ Oh so you immediately downvote instead of explaining how this is not the right answer so maybe I can improve it ? Perhaps your question was not entirely clear ? \$\endgroup\$ – Bimpelrekkie Dec 2 '16 at 11:04
  • 2
    \$\begingroup\$ @crowie there's two ? in your question, and both sentences ending with ? were answered by this answer. \$\endgroup\$ – Marcus Müller Dec 2 '16 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.