Tuesday, September 15, 2009

8 x 8 Keyboard Interface(Without Interrupt signal)

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

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

No comments:

Post a Comment