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!|
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:
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