2. Introduction
8279 programmable keyboard/display controller is designed by Intel
that interfaces a keyboard with the CPU.
The keyboard first scans the keyboard and identifies if any key has
been pressed. It then sends their relative response of the pressed key to
the CPU and vice-a-versa.
3. How Many Ways the Keyboard is Interfaced
with the CPU?
The Keyboard can be 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 will continue with its
main task.
In the Polled mode, the CPU periodically reads an internal flag
of 8279 to check whether any key is pressed or not with key
pressure
4. Architecture
Main Units:
I/O Control and Data Buffer
Control and Timing Registers
Scan Counter
Return Buffers, Keyboard Debounce, and Control
FIFO/Sensor RAM and Status Logic
Display Address Registers and Display RAM
6. I/O Control and Data Buffer
This unit controls the flow of data through the microprocessor. It is
enabled only when D is low. Its data buffer interfaces the external bus
of the system with the internal bus of the microprocessor.
The pins A0, RD, and WR are used for command, status or data
read/write operations.
7. FIFO/Sensor RAM and Status Logic
This unit acts as 8-byte first-in-first-out (FIFO) RAM where the key
code of every pressed key is entered into the RAM as per their
sequence. The status logic generates an interrupt request after each
FIFO read operation till the FIFO gets empty.
In the scanned sensor matrix mode, this unit acts as sensor RAM
where its each row is loaded with the status of their corresponding row
of sensors into the matrix. When the sensor changes its state, the IRQ
line changes to high and interrupts the CPU.
8. n sensor matrix mode the condition (i.e., open/close status) of 64 switches is
stored in FIFO RAM. If the condition of any of the switches changes then the 8279
asserts IRQ as high to interrupt the processor.
FIFO
In sensor matrix mode the condition (i.e., open/close status) of 64
switches is stored in FIFO RAM. If the condition of any of the
switches changes then the 8279 asserts IRQ as high to interrupt
the processor.
9. Display Address Registers and Display
RAM
This unit consists of display address registers which holds the
addresses of the word currently read/written by the CPU to/from the
display RAM.
10. Control and Timing Register
This unit contains registers to store the keyboard, display modes, and
other operations as programmed by the CPU. The timing and control
unit handles the timings for the operation of the circuit.
11. Scan Counter
It has two modes i.e. Encoded mode and Decoded mode.
In the encoded mode, the counter provides the binary count that is to
be externally decoded to provide the scan lines for the keyboard and
display.
In the decoded scan mode, the counter internally decodes the least
significant 2 bits and provides a decoded 1 out of 4 scan on SL0-SL3.
12. Return Buffers, Keyboard Debounce, and
Control
This unit first scans the key closure row-wise, if found then the
keyboard debounce unit debounces the key entry.
In case, the same key is detected, then the code of that key is directly
transferred to the sensor RAM along with SHIFT & CONTROL key
status.
15. 8279 Pin Description
Data Bus Lines, DB0 - DB7
These are 8 bidirectional data bus lines used to transfer the data
to/from the CPU.
CLK
The clock input is used to generate internal timings required by
the microprocessor.
RESET
As the name suggests this pin is used to reset the microprocessor.
CS Chip Select
When this pin is set to low, it allows read/write operations, else
this pin should be set to high.
A0
This pin indicates the transfer of command/status information.
When it is low, it indicates the transfer of data.
RD, WR
This Read/Write pin enables the data buffer to send/receive data
over the data bus.
16. 8279 Pin Description
IRQ
This interrupt output line goes high when there is data in the
FIFO sensor RAM. The interrupt line goes low with each FIFO
RAM read operation. However, if the FIFO RAM further
contains any key-code entry to be read by the CPU, this pin
again goes high to generate an interrupt to the CPU.
Vss, Vcc
These are the ground and power supply lines of the
microprocessor.
SL0 SL3
These are the scan lines used to scan the keyboard matrix and
display the digits. These lines can be programmed as encoded or
decoded, using the mode control register.
RL0 RL7
These are the Return Lines which are connected to one terminal
of keys, while the other terminal of the keys is connected to the
decoded scan lines. These lines are set to 0 when any key is
pressed.
17. 8279 Pin Description
BD
It stands for blank display. It is used to blank the display during
digit switching.
OUTA0 OUTA3 and OUTB0 OUTB3
These are the output ports for two 16x4 or one 16x8 internal
display refresh registers. The data from these lines is
synchronized with the scan lines to scan the display and the
keyboard.
18. Operational Modes
1. Input Modes: Keyboard and Sensor inputs.
2. Output Modes: Display data handling.
3. Display Modes
19. Input Mode Details
This mode deals with the input given by the keyboard and this mode is
further classified into 3 modes.
Scanned Keyboard Mode − In this mode, the key matrix can be
interfaced using either encoded or decoded scans. In the encoded
scan, an 8×8 keyboard or in the decoded scan, a 4×8 keyboard can
be interfaced. The code of key pressed with SHIFT and CONTROL
status is stored into the FIFO RAM.
Scanned Sensor Matrix − In this mode, a sensor array can be
interfaced with the processor using either encoder or decoder scans.
In the encoder scan, 8×8 sensor matrix or with decoder scan 4×8
sensor matrix can be interfaced.
Strobed Input − In this mode, when the control line is set to 0, the
data on the return lines is stored in the FIFO byte by byte.
20. Output Mode Details
This mode deals with display-related operations. This mode is
further classified into two output modes.
Display Scan − This mode allows 8/16 character multiplexed
displays to be organized as dual 4-bit/single 8-bit display units.
Display Entry − This mode allows the data to be entered for
display either from the right side/left side.
21. Display Modes
Left Entry Mode: It is also known as typewriter mode. In this, the first
type of character is present at the left-most position while further
incoming characters appear successively towards the right. This means
data begins to appear from the left side of the display unit. So, the bit
value at address 0 in the display RAM will appear at the left-most
position whereas the bit value at address 15 will appear at the right-most
position.
Right entry Mode: This mode is also known as calculator mode. This is
so because in the calculator the first entered character appears at the
rightmost position and then successively when a new character has
entered the position of the former one is shifted towards the left. Thus, in
this mode, the first entry will appear at the rightmost position but as
soon as a new entry is made then the previous one will get shifted
towards the left by one and the present entry will take the rightmost
position.
22. Advantages
Reduces CPU Load:
It handles keyboard scanning and display refreshing independently,
freeing the CPU for other tasks.
Programmable Features:
Supports different keyboard modes (encoded, decoded, 2-key lockout, N-
key rollover), display modes (right/left entry), and scan timings.
Handles Debouncing:
Automatically deals with key bounce — no need to write software for
debouncing keys.
FIFO Buffer:
Keypresses are stored in a FIFO (First In, First Out) buffer, allowing
smooth reading without missing inputs.
Multiplexed Display Control:
Manages 7-segment LED displays efficiently with minimum pins and
without burdening the main processor.
Interrupt Capability:
It can generate interrupts to the CPU when a key is pressed, improving
real-time response.
Flexible Interface:
Can connect to various microprocessors like 8085, 8086 easily.
23. Disadvantages
Limited Modern Usage:
Mainly designed for older microprocessors — not widely used in
modern embedded systems which use integrated solutions.
Fixed Architecture:
Only supports specific keyboard and display sizes (e.g., 64-key
keyboard, 16-digit display).
External Components Required:
Needs external drivers for high-current display devices like
larger LED segments.
Learning Curve:
Programming and configuring its modes correctly can be
complex for beginners.
No Support for Advanced Input Devices:
Can't handle modern input devices like touchscreens, matrix
keypads with high levels of complexity, etc.
Timing Constraints:
The scan timing and response are rigid once set; real-time
adjustments can be tricky.
24. Applications
Flight Management Systems (FMS) Keyboards
In older aircraft FMS units, pilots enter waypoints, flight plans, and parameters
using matrix-style keyboards.
The 8279 concept (scanning a keyboard matrix and sending keypresses to a CPU)
matches perfectly.
The debouncing and FIFO key storage would help avoid errors in critical input.
Control Display Units (CDUs)
The CDU, part of the FMS, has alphanumeric keys and a small display.
8279-style devices manage the keyboard scanning and display refreshing —
similar to how it refreshes a 16-digit LED or LCD screen.
Mode Control Panels (MCP)
MCPs (used for autopilot modes) have discrete pushbuttons (e.g., Heading Hold,
Altitude Select).
The 8279's ability to detect and debounced button presses accurately would fit
perfectly here.
Anywhere in aircraft avionics where you have lots of buttons and a small display —
the functionality of 8279 (scanning, debouncing, buffering, and displaying) would be
ideal.
25. Summary
8279 simplifies interfacing keyboard and LED displays.
Offloads scanning, debouncing, refreshing from CPU.
Highly flexible with programmable modes.
Useful for industrial consoles, computers, handheld devices.