Hacked Gadgets Forum

September 23, 2011

How to Interface a Microcontroller to a PS/2 Keyboard

at 11:11 pm. Filed under Computer Hacks, DIY Hacks, Electronic Hacks


Interacting with your project can be as simple as hooking up an IO pin to a button but if you need greater capability it might be time for a keyboard. In this tutorial Chris from PyroElectro demonstrates how to connect a PIC microcontroller to a PS/2 keyboard. One issue these days is finding a PS/2 keyboard, thankfully before USB came around they were a standard for a long time so if you can’t find one new you will certainly be able to get your hands on a used one.

“The system designed in this article is a simple passive PS/2 host device. It receives commands sent to it (key presses) and then outputs them to a 7 segment LED, but it never sends commands, all communication is 1 way in this system, which greatly simplifies the design and implementation.”