Interfacing the PC / Beyond Logic
Quality Information in one Place . . .

Parallel Ports
Serial Ports
Interrupts
AT Keyboard Ports
USB


The PC's keyboard.

Why would you want to interface the Keyboard? The IBM keyboard can be a cheap alternative to a keyboard on a Microprocessor development system. Or maybe you want a remote terminal, just couple it with a LCD Module.

Maybe you have a RS-232 Barcode Scanner or other input devices, which you want to use with existing software which only allows you to key in numbers or letters. You could design yourself a little box to convert RS-232 into a Keyboard Transmission, making it transparent to the software.

An interfacing example is given showing the keyboard's protocols in action. This interfacing example uses a 68HC705J1A MCU to decode an IBM AT keyboard and output the ASCII equivalent of the key pressed at 9600 BPS.

Note that this page only deals with AT Keyboards. If you have any XT keyboards, you wish to interface, consider placing them in a museum. We will not deal with this type of keyboard in this document. XT Keyboards use a different protocol compared to the AT, thus code contained on this page will be incompatible.



PC Keyboard Theory

Scan Codes

The Keyboard's Connector

The Keyboard's Protocol

Interfacing Example - Keyboard to ASCII Decoder

Parallel Ports
Serial / RS-232 Ports
Interrupts
AT Keyboard Ports
USB

Copyright 1999-2000 Craig Peacock - Monday 28th February 2000.