Microprocessor and Microcontroller
2.5 Keyboard and Display Controller (8279)
8279 is a general-purpose Keyboard Display controller that simultaneously
drives the display of a system and interfaces a Keyboard with the CPU. The
Keyboard Display interface scans the Keyboard to identify if any key has been
pressed and sends the code of the pressed key to the CPU. It also transmits the
data received from the CPU, to the display device. Both of these functions are
performed by the controller in repetitive fashion without involving the CPU.
The Keyboard is interfaced either in the interrupt or the polled mode. In the
interrupt mode, the processor is requested service only if any key is pressed,
otherwise the CPU can proceed with its main task. In the polled mode, the CPU
periodically reads an internal flag of 8279 to check for a key pressure.
Pin Diagram
Fig. 2.10 8279 Pin Diagram
DB0 - DB7:These are bidirectional data bus lines. The data and command
words to and from the CPU are transferred on these lines.
CLK:This is a clock input used to generate internal timings required by
8279.
RESET:This pin is used to reset 8279. A high on this line resets 8279. After
resetting 8279, it’s in sixteen 8-bit display, left entry encoded scan, 2-key lock
out mode. The clock prescaler is set to 31.
CS chip select:A low on this line enables 8279 for normal read or write
operations. Otherwise this pin should be high.
61