Display 090920122425 Phpapp01 PDF
Display 090920122425 Phpapp01 PDF
WHY 8279???
WHAT WE KNOW,
8255 can be used in interfacing keyboards and displays.
The disadvantages of this method of interfacing keyboard and
display is that the processor has to refresh the display and check
the status of the keyboard periodically
using polling technique.
Thus a considerable amount of CPU time is wasted, reducing
the system operating speed.
Intel’s 8279 is a general purpose keyboard display
controller that simultaneously drives the display of a
system and interfaces a keyboard with the CPU, leaving it
free for its routine task.
IIE - SAP
Keyboard segment
Scans the keyboard, Display segment
detects key press It puts data from
transmits to CPU the CPU to display
the characteristic s
of key
devices
8279
IIE - SAP
• Connected to a 64 contact key matrix
• Keyboard entries and debounced and
stored in FIFO
Keyboard • Interrupt signal is generated with each
segment entry
IIE - SAP
KEYBOARD
BLOCK
MPU
DIA SCAN
INTERFACE
8279
DISPLAY
IIE - SAP
IIE - SAP
A set of
eight output
A set of four lines for
scan lines interfacing
and eight display
return lines
The keyboard for
display interfacing
controller keyboard
chip 8279
provides IIE - SAP
• The I/O control section controls the flow of data to/from
I/O the 8279
Control • The I/O section is enabled only if CS is low.
• The pins A0, RD and WR select the command, status or
and data read/write operations carried out by the CPU with
Data 8279.
Buffers : • The data buffers interface the external bus of the system
with internal bus of 8279.
Control • These registers store the keyboard and display modes and
and other operating conditions programmed by CPU.
Timing • The registers are written with A0=1 and WR=0. The
Timing and control unit controls the basic timings for the
Register operation of the circuit.
and • Scan counter divide down the operating frequency of
Timing 8279 to derive scan keyboard and scan display
Control : frequencies.
IIE - SAP
• The scan counter has two modes to scan
the key matrix and refresh the display.
• In the encoded mode, the counter provides
binary count that is to be externally decoded
to provide the scan lines for keyboard and
display
Scan • Four externally decoded scan lines may drive
upto 16 displays.
Counter • In the decode scan mode, the counter
: internally decodes the least significant 2 bits
and provides a decoded 1 out of 4 scan on
SL0-SL3
• Four internally decoded scan lines may drive
upto 4 displays.
• The keyboard and display both are in the
same mode atIIE -aSAPtime.
Return
Buffers • This section scans for a key closure row wise. If a
and key closer is detected, the keyboard debounce
unit debounces the key entry (i.e. wait for 10 ms).
Keyboard
• After the debounce period, if the key continues to
De- be detected, The code of key is directly
bounce transferred to the sensor RAM along with SHIFT
and and CONTROL key status.
Control:
Display
Address • The display address register holds the address
of the word currently being written or read by
Register the CPU to or from the display RAM.
s and • The contents of the registers are automatically
Display updated by 8279 to accept the next data entry
RAM : by CPU.
IIE - SAP
• In keyboard or strobed input mode, this block
acts as 8-byte first-in-firstout (FIFO) RAM.
• Each key code of the pressed key is entered
in the order of the entry and in the mean
time read by the CPU, till the RAM become
empty.
• The status logic generates an interrupt after
FIFO/Sensor each FIFO read operation till the FIFO is
RAM and empty.
Status Logic:
• In scanned sensor matrix mode, this unit acts
as sensor RAM.
• Each row of the sensor RAM is loaded with
the status of the corresponding row of
sensors in the matrix.
• If a sensor changes its state, the IRQ line goes
high to interrupt the CPU.
IIE - SAP
IIE - SAP
IIE - SAP
IIE - SAP
IIE - SAP
IIE - SAP
IIE - SAP
• Scanned Operating
keyboard mode modes of 8279
• Scanned sensor • Display scan
matrix mode • Display entry
•
• Strobed input
mode
INPUT ( OUTPUT
keyboard) (display )
MODES MODES
IIE - SAP
Scanned Keyboard
Mode : 2 key
This mode allows a key lock out
matrix to be interfaced
using either encoded or
decoded scans.
encoded scan 8*8
keyboard,
decoded scan 4*8 N – key
keyboard. roll over
The code of key pressed
with SHIFT and
CONTROL is stored in
FIFO RAM.
IIE - SAP
2 key
lock out
IIE - SAP
When a key is pressed, a debounce logic comes into operation. During the
next two scans, other keys are checked for closure and if no other key is
pressed the first pressed key is identified.
The key code is entered with SHIFT and CNTL status, provided the FIFO is
not full, i.e. it has at least one byte free. If not free, data will not be entered
and the error flag is set.
If FIFO has at least one byte free, the above code is entered into it and the
8279 generates an interrupt on IRQ line to the CPU to inform about the
previous key closures.
A key code is entered to FIFO only once for each valid depression,
independent of other keys pressed along with it, or released before it.
IIE - SAP
Scanned Keyboard with N-Key Rollover : In
this mode, each key depression is treated
independently.
IIE - SAP
Scanned Sensor Matrix :
In this mode, a sensor array can be interfaced with 8279 using either
encoded or decoded scans. With encoded scan 8*8 sensor matrix or
with decoded scan 4*8 sensor matrix can be interfaced.
The sensor codes are stored in the CPU addressable sensor RAM.
In the sensor matrix mode, the debounce logic is inhibited. The 8-
byte FIFO RAM now acts as 8 * 8 bit memory matrix.
The status of the sensor switch matrix is fed directly to sensor RAM
matrix. Thus the sensor RAM bits contains the rowwise and column
wise status of the sensors in the sensor matrix.
The IRQ line goes high, if any change in sensor value is detected at
the end of a sensor matrix scan or the sensor RAM has a previous entry
to be read by the CPU.
The IRQ line is reset by the first data read operation, if AI = 0,
otherwise, by issuing the end interrupt command. AI is a bit in read
sensor RAM word.
IIE - SAP
Strobed input:
In this mode, if the control lines goes low, the data on return lines, is stored in the
FIFO byte by byte.
a) Keyboard Display Mode Set : The format of the command word to select different
modes of operation of 8279 is given below with its bit definitions.
D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 D D K K K
IIE - SAP
SENSOR MATRIX
SENSOR MATRIX
IIE - SAP
B) Programmable clock :
0 0 1 P P P P P
IIE - SAP
c) Read FIFO / Sensor RAM : The format of this command is given
below.
D7 D6 D5 D4 D3 D2 D1 D0
0 1 0 AI X A A A
This word is written to set up 8279 for reading FIFO/ sensor RAM.
In scanned keyboard mode, AI and AAA bits are of no use. The 8279
will automatically drive data bus for each subsequent read, in the
same sequence, in which the data was entered.
In sensor matrix mode, the bits AAA select one of the 8 rows of
RAM.
If AI flag is set, each successive read will be from the subsequent
RAM location.
IIE - SAP
d) Read Display RAM :
This command enables a programmer to read the display RAM data.
D7 D6 D5 D4 D3 D2 D1 D0
0 1 1 AI A A A A
IIE - SAP
d) Write Display RAM :
This command enables a programmer to write the display RAM data.
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 AI A A A A
E- Error mode
X- don’t care
For the sensor matrix mode, this command lowers the IRQ
line and enables further writing into the RAM.
Otherwise, if a change in sensor value is detected, IRQ
goes high that inhibits writing in the sensor RAM.
For N-Key roll over mode, if the E bit is programmed to be
‘1’, the 8279 operates in special Error mode
IIE - SAP
I/O Interface
FIFO status register
IIE - SAP