4x3 keypad interfacing with 8051 assembly language tutorial

preview_player
Показать описание
4x3 keypad interfacing with 8051 microcontrollers in assembly language programming is explained in this tutorial. The program which is developed in this tutorial is to continuously scan the 4x3 keypad with 8051 and once the key is pressed it will detect that keypress using row-column keypad scanning method and read the respective key code from the lookup table method and then write that code on P0 of the 8051 microcontrollers. We attached the keypad with the 8051 microcontrollers on the P1 port of the 8051 microcontrollers. In the assembly language of the 8051, we declared in the code as following lines

KEYPAD_PORT EQU P1
LEDS_PORT EQU P0

and the lookup table for the keyscan method is written as follows

KCODE0: DB 0FFH, 01H, 02H, 03H
KCODE1: DB 0FFH, 04H, 05H, 06H
KCODE2: DB 0FFH, 07H, 08H, 09H
KCODE3: DB 0FFH, 0AH, 00H, 0BH
Рекомендации по теме
welcome to shbcf.ru