Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

8 x 4 Matrix Keyboard Interface

Statement: Interface an 8 x 4 matrix keyboard to 8085 through 8279.

HARDWARE FOR INTERFACING 8×4 MATRIX KEYBOARD

Fig. shows the interfacing of 8 x 8 matrix keyboard in interrupt driven keyboard mode. In the interrupt driven mode interrupt line from 8279 is connected to the one of the interrupt input of 8085 except INTR. Here, INT line from 8279 is connected to the interrupt RST 7.5 of 8085. Other signal connections are same as in the non interrupt mode.

75a-8 x 4 Matrix Keyboard InterfaceNOTE: As keyboard is having 8 rows and 4 columns, only 4 scan lines are required and we can avoid external decoder to generate scan lines by selecting decoded scan keyboard mode.

SOFTWARE FOR INTERFACING 8×4 MATRIX KEYBOARD 

Source program:

  • MVI A, 00H : Initialize keyboard/display in encoded
  • OUT 81H : scan keyboard 2 key lockout mode
  • MVI A, 34H
  • OUT 81H : Initialize prescaler count
  • MVI A, 0BH : Load mask pattern to enable RST 7.5
  • SIM : mask other interrupts
  • EI : Enable Interrupt
  • HERE: JMP HERE : Wait for the interrupt

Interrupt Subroutine:

  • MVI A, 40H : Initialize 8279 in read FIFO
  • OUT 81H : RAM mode
  • IN 80H : Read FIFO RAM (keycode)
  • EI : Enable Interrupt
  • RET : Return to main program

Related Programs (Click down)

Blink port C bit 0 of 8255

Flashing of LEDs

Traffic Light Control

Stepper Motor Control