8051 Projects

93C66 device driver
AT Keyboard driver
Related Hardware
XT Keyboard interface
I've been asked to write new programming for SoundWare Associates signal routing system using the Atmel AT89C51 in place of the Motorola MC68HC705P3S used in their current routers. This change is for several reasons, not the least is component count and cost. Today an MC68HC705P3s costs $15.95 (from Jameco), has to emulate a UART and, therefore, uses up all its interrupts and needs hardware to interface to an XT keyboard. The Atmel flash AT89C51 costs only $3.49 (from JDR), has an onboard UART, and can talk to the more modern AT keyboards with ease.
While the complete programs won't be available online, I've decided to make the preliminary test program available. My own searches through the Web showed me there is a great deal of misunderstanding as to how to communicate with an AT keyboard, especially to send commands to it.
I'll admit, it is tricky, but not impossible.
The program listing is for a test program which worked succesfully at 7.3MHz with all three devices (keyboard, 93C66 EEPROM, and RS-232).
The keyboard lost data when run at 3.6MHZ, the other devices performed just fine at 3.6MHz to 16MHz. One interesting note: the serial interface is operated in polled mode. Not much is mentioned about this mode in the manuals, and the names of the bits you need to monitor (TI and RI) imply they function only as interrupt flags, but they may be used without the serial interrupt enabled. This mode is fine if the program can service the data, otherwise much more complexity is required to handle interrupts and data buffering.

MPUCoder HomeMPUCoder Home

You are visitor