Jonathan Oxer
[Blog]
Blog > Input from PS/2 (or USB!) keyboard to Arduino
>> Input from PS/2 (or USB!) keyboard to Arduino
Sun, Jun 7th 9:17pm 2009: Practical Arduino
Originally posted on Practical Arduino Time for a quick progress report on the PS/2 input project. Electrically it couldn't be much simpler. Connect the right wires in a PS/2 extension cable to +5V, GND, and two data pins, and the rest is all software. With this shield I can read keypresses on a PS/2 keyboard:
Yes, that's a USB-to-PS/2 keyboard adaptor plugged in, and yes, it works with (some) USB keyboards! PS/2 keyboards can be quite hard to find nowadays but most USB keyboard chipsets are made with a "PS/2 emulation" mode that lets them revert to speaking PS/2 when they detect that they are connected to a PS/2 port. A quick test with the USB keyboard that came with my Asus eeebox worked perfectly.
So why on Earth would you want to connect a full keyboard to an Arduino? Lots of reasons, actually. One neat trick my friend Scott Penrose does is use a keyboard as an input multiplexer. Basically he connects a bunch of devices to the back of the switches in a hacked keyboard and just reads the keycodes to detect events. Slick! Gives him 80+ digital inputs at very low cost (keyboards can be less than $10) and with only a couple of input pins.
Originally posted on Practical Arduino Time for a quick progress report on the PS/2 input project. Electrically it couldn't be much simpler. Connect the right wires in a PS/2 extension cable to +5V, GND, and two data pins, and the rest is all software. With this shield I can read keypresses on a PS/2 keyboard:
Yes, that's a USB-to-PS/2 keyboard adaptor plugged in, and yes, it works with (some) USB keyboards! PS/2 keyboards can be quite hard to find nowadays but most USB keyboard chipsets are made with a "PS/2 emulation" mode that lets them revert to speaking PS/2 when they detect that they are connected to a PS/2 port. A quick test with the USB keyboard that came with my Asus eeebox worked perfectly.
So why on Earth would you want to connect a full keyboard to an Arduino? Lots of reasons, actually. One neat trick my friend Scott Penrose does is use a keyboard as an input multiplexer. Basically he connects a bunch of devices to the back of the switches in a hacked keyboard and just reads the keycodes to detect events. Slick! Gives him 80+ digital inputs at very low cost (keyboards can be less than $10) and with only a couple of input pins.[ Back to top ]
