Statement: Interface an 8 x 8 matrix keyboard to 8085 through 8279 in 2-key lockout mode and write an assembly language program to read keycode of the pressed key. The external clock frequency is 2MHz. Use I/O mapped I/O technique. (Dont use any Interrupts)
HARDWARE FOR 8 x 8 MATRIX KEYBOARD INTERFACE
_thumb.gif)
_thumb.gif)
SOFTWARE FOR 8 x 8 MATRIX KEYBOARD INTERFACE
The three steps needed to write the software are:
Step 1: Find keyboard/display command word.
_thumb.gif)
Step 2: Find program clock command word
_thumb.gif)
Step 3: Find Read FIFO/sensor RAM command word.
| Source program: - MVI A, 00H : Initialize keyboard/display
- OUT 81H : in encoded scan keyboard-2 keylockout mode
- MVI A, 34H
- OUT 81H : Initialize prescaler count
- BACK: IN 81H : Read FIFO status word
- ANI 07H : Mask bit B3 to B7
- JZ BACK : If 0, key is not pressed wait for key press else read FIFO RAM
- MVI A, 40H : Initialize 8279 in read
- OUT 81H : FI FO RAM mode
- IN 80H : Read FIFO RAM (keycode)
- HLT : Stop program execution.
| Flowchart |
Related Programs (Click down)
Flashing of LEDs
Traffic Light Control
Stepper Motor Control
Keyboard interface(64-key-matrix-keyboard)