4
\$\begingroup\$

It is my understanding that most newer USB keyboards will not work with the PS2Keyboard library because they do not use the PS/2 protocol. Some, but not all, do have the ability to use the PS/2 protocol:

Many keyboards and mice can connect via either USB or PS/2, selecting the appropriate protocol at power-on. Such devices are generally equipped with a USB connector, and ship with a passive connector adapter to allow connection to a PS/2 port. Conversely, modern USB keyboards and mice usually have only USB plugs and require an active adapter to connect to a PS/2 port.[1]

If it has the capability, would a USB keyboard select the appropriate protocol when wired to an Arduino automatically? If not, is there a way I can force it to select PS/2?

If the USB keyboard does not have the protocol selection capability, would an active adapter work with an Arduino?

\$\endgroup\$
1
  • \$\begingroup\$ It may be possible to use a USB keyboard with the USB Host Shield. \$\endgroup\$
    – Kevin Mark
    Commented Apr 16, 2013 at 1:26

1 Answer 1

1
\$\begingroup\$

This question is a little bit broad to answer because it depends entirely on the keyboard itself.

If the keyboard has the hardware to use the PS/2 protocol, this yes, you might be able to use it with an adapter. If, however, the keyboard only has the hardware for the USB protocol, then your adapter must do it.

Most of those USB to PS/2 adapters are just physical connectors. It was up to the keyboard's hardware to use the right protocol.

Electrically USB and PS/2 are vastly different protocols. In terms of protocol implementation PS/2 is a simple clocking scheme while USB is a fully layered protocol stack.

As for forcing the keyboard to speak one or the other, that's going to be ENTIRELY dependent on the keyboard. I doubt there's any kind of reference which would provide that kind of information.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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