Learn about the technologies behind the Internet with The TCP/IP Guide!
NOTE: Using robot software to mass-download the site degrades the server and is prohibited. See here for more.
Find The PC Guide helpful? Please consider a donation to The PC Guide Tip Jar. Visa/MC/Paypal accepted.
View over 750 of my fine art photos any time for free at DesktopScenes.com!

[ The PC Guide | Systems and Components Reference Guide | Keyboards | Keyboard Construction and Operation | Keyboard Operation ]

Keyboard Interface Signaling

As mentioned in the section on the keyboard interface--which you should read before reading this page if you have not yet done so--the interface between the keyboard and the keyboard controller on the motherboard is really a communications channel, over which commands and data are passed. The keyboard interface uses specific signaling protocols and standards to ensure that pretty much any keyboard can talk to any PC system.

The standard keyboard interface is a serial communications link. "Serial" just means that data is sent one bit at a time over a single line (as opposed to parallel channels, where many bits are sent at once over many lines). Serial communications was chosen for the keyboard interface because it is simple and reliable, and not a lot of data per second needs to be sent over the interface for a keyboard.

There are four lines that comprise the channel between the PC and the keyboard. Two of these, the power and ground lines, are used to provide power to the keyboard. The other two are these signaling lines:

  • Keyboard Data: This is the line over which data bits are sent to the system from the keyboard, and commands sent from the system to the keyboard.
  • Keyboard Clock: This is a repetitive, regular clock signal, with a value that switches from 1 to 0 to 1 to 0 in a regular pattern. It is much like the ones used elsewhere in the PC, such as to control the system memory, or the expansion bus. Of course, it runs much slower than these other clocks, since the keyboard is a slow device. The purpose of the clock signal is to synchronize the keyboard and the system, so they are always "on the same page" regarding exactly when data will show up on the keyboard data signal line. You can read more about clocks in general terms on this fundamentals page.

Though I mentioned that the keyboard interface is similar to a regular PC serial communications line, the presence of the clock signal really differentiates the two. The clock makes the keyboard signaling synchronous; all bit transfers occur in time with the beat of the clock, almost like a drummer setting the tone for a band. Conventional serial connections are asynchronous; the data is sent not based on a clock but in response to a specific request from one device or the other.

The information I've described so far in this page applies to modern keyboards, which is anything from the mid-1980s on. The old 83-key keyboards used on the first IBM PCs and early clones were somewhat different electrically from the keyboards we use today; the primary difference is that they were unidirectional--only able to receive data from the PC, not send it. You cannot generally mix modern keyboards with these old keyboards. For a while--especially in the late 1980s when many of these original PCs were being used side by side with newer AT and later models--keyboards often came with a physical switch on the bottom to select either "AT" or "PC/XT" signaling. Today most keyboard makers no longer bother with these switches, the PC/XT being long beyond obsolete.

Anyway, that's the core of how keyboard signaling works. I'm going to stop here, as I've covered most of the fundamentals, and I don't think you really want me to melt your brain by posting all the command codes, bit protocols and such. :^) They aren't anything you'll need to know anyway, unless you become a keyboard or chipset designer...

Next: Keyboard Key Groupings


Home  -  Search  -  Topics  -  Up

The PC Guide (http://www.PCGuide.com)
Site Version: 2.2.0 - Version Date: April 17, 2001
Copyright 1997-2004 Charles M. Kozierok. All Rights Reserved.

Not responsible for any loss resulting from the use of this site.
Please read the Site Guide before using this material.
Custom Search