How to Interface a Microcontroller with a PS/2 Keyboard

In most of the case, it’s highly important when you’re moving from basic microcontroller programming to advanced microcontroller programming, especially if you wants to interrupt the code.

Technically, interrupts are pieces of code that much likes functions. The interrupts are executed automatically when outside events occur. People always used the interrupts to react to all sorts of outside inputs; including pin changes that driven by outside devices.

By using the interrupts, it enables the users to give the code an ability to react to events as they happen. In this case, we don’t have to wait for the code to get to a place where it can handle an event.

For your information, the project uses interrupts to interface a PS/2 keyboard with the USB NerdKit. To be honest, the simplicity of the protocol and the asynchronous nature of the clock generated by the keyboard make it a great start, especially for the amateur to get familiar with interrupts and interrupt handlers.

The PS/2 keyboard is quite cheap and very easy to obtain, at the garage sales, online auction or electronic stores. By the way, if you don’t want to chop your PS/2 keyboard, you might consider to get an extension cable for a PS/2 keyboard.

[..Source link..]

Bookmark the permalink.

Leave a Reply