Keyboard/Display Controller (8279)
Matrix Keyboard Multiplexed Display Interfacing of a single key switch with 8085 is complex for interfacing more number of switches. Connected in matrix form Rows of keyboard matrix – 4 output port lines Column lines – 4 input port lines Multiplexed Display Interfacing more number of seven segment display
Functional Block Diagram
Features of IC Keyboard of size up to 64-key matrix with 2-key lockout and n-key rollover options Simultaneous keyboard and display operation 8 character FIFO memory 16 digits of display
3 Sections Display Section with its own display RAM Keyboard scan section with FIFO registers Control Logic with signals for interfacing with the processor
Signal description 8279 pins
Pin diagram and Signal description of 8279
Control Signals CS: Chip Select A0: Select data or control register A0 = Logic 1 content of data bus is command / status A0 = Logic 0 content of data bus is data for IC OUT A0-A3 and OUT B0-B3: Data output lines for the display units. BD: Blank all displays IRQ: Interrupt request sent to processor CNTL/STB: Control or Strobe signal. Shift: Input to 8279 from shift key of keyboard SL0-SL3: 4 Scan lines 2 modes : Encoded mode & Decoded Mode
Control Word selection using MSB 3 bits FUNCTION Mode set 1 Clock Read FIFO Read Display Write Display Display write inhibit Clear End Interrupt
Keyboard/Display Mode Set DD is the display mode and KKK is the keyboard mode
Keyboard/Display Mode Set
Keyboard/Display Mode Set
Programmable Clock PPPPP is a 5-bit binary constant. The input frequency is divided by a decimal constant ranging from 3 to 31, decided by the bits of an internal prescalar PPPPP
Read FIFO/Sensor RAM X – Don’t Care AI – Auto Increment flag AAA – Address pointer to 8-bit FIFO RAM
Read Display RAM AI is auto increment flag and AAAA, the 4-bit address, points to the 16-byte display RAM that is to be read. If AI=1, the address will be automatically, incremented after each read or write to the display RAM.
Write Display RAM
Clear Display RAM CD – Clear display RAM CF – Clear the keyboard FIFO RAM CA – Clear both display Ram & FIFO RAM
End Interrupt/Error Mode Set For N-key rollover mode, if the E bit is programmed to be ‘1’, the 8279 operates in special error mode
Keyboard status Word format S/E O U F N N – Number of keys pressed F – Indicate FIFO is full U – Underrun error bit ( read attempt from empty FIFO) O – Overrun error bit ( entry into full FIFO) S/E – Multiple key pressed D – Unavailability of display
Keyboard Code Word format CTRL SHIFT S2 S1 S0 R2 R1 R0 R0,R1,R2 – Encoded column position S0,S1,S2 – Encoded Row position
Interfacing Keyboard/Display to the Microprocessor Using Intel 8279