-
Ordering information
Call us or mail us for inquiries & availability: info@mtronixtech.com
-
Search projects by Price
-
Project Categories
- Robots and Robotics
- GSM based Projects
- GPS based Projects
- RFID based Projects
- Energy Saving
- Wireless Communication
- DTMF based projects
- SMS based projects
- RF Remote
- Mobile Controlled
- Power Saver
- Sensor based Projects
- Alcohol Sensor
- heartbeat Sensor
- Humidity Sensor
- Infrared Sensor
- Level Sensor
- Light Sensor
- LPG Gas Sensor
- Moisture Sensor
- Temperature Sensor
- Vibration Sensor
- Weight Sensor
-
Search projects by Application
Project Videos:
Landrover Robot Operated by Cellphone
Industrial Automation using Cellphone
Password based door locking
Automatic room light controller
Temperature controlled fan
Electronic voting machine
Search by Components
89c51 89s51 89s52 89v51RD2 555 ADC0808 ADC0809 AT24c16 AT24c64 AT89s52 Battery BC547 Bulb Buzzer Darlington Pair DC motor Decoder EEPROM Fan GPS GSM IR LED Keypad L239D LCD Display LDR LED LM35 LM358 Matrix keypad MAX232 Motor Driver MQ6 PC Interface Relay RFID Card RFID Reader RFID Tags Sim300 sim900 SR86 SR87 Stepper Motor SYHS220 TSOP1738
Assembly code for Matrix Keypad (4x3)
Sample code for Matrix Keypad (4x3).
Following code can be using for 8051 and 8052 ICs like: 89c51, 89c52, 89s51, 89s52, 89c2051.
;========================================================== ; Pin Definations ;========================================================== keypad equ 90h key1 equ 90h key2 equ 91h key3 equ 92h key4 equ 93h key5 equ 94h key6 equ 95h key7 equ 96h ;========================================================== ; Main Program starts from here ;========================================================== loop: mov a,keypad orl a,#7fh mov keypad,a clr key4 jb key1,chkkey2 call debounce jb key1,chkkey2 jnb key1,$ mov @r0,#01h inc r0 mov lcddatabus,#'1' call lcddata chkkey2 jb key2,chkkey3 call debounce jb key2,chkkey3 jnb key2,$ mov @r0,#02h inc r0 mov lcddatabus,#'2' call lcddata chkkey3 jb key3,chkkey4 call debounce jb key3,chkkey4 jnb key3,$ mov @r0,#03h inc r0 mov lcddatabus,#'3' call lcddata chkkey4 mov a,keypad orl a,#7fh mov keypad,a clr key5 jb key1,chkkey5 call debounce jb key1,chkkey5 jnb key1,$ mov @r0,#04h inc r0 mov lcddatabus,#'4' call lcddata chkkey5 jb key2,chkkey6 call debounce jb key2,chkkey6 jnb key2,$ mov @r0,#05h inc r0 mov lcddatabus,#'5' call lcddata chkkey6 jb key3,chkkey7 call debounce jb key3,chkkey7 jnb key3,$ mov @r0,#06h inc r0 mov lcddatabus,#'6' call lcddata chkkey7 mov a,keypad orl a,#7fh mov keypad,a clr key6 jb key1,chkkey8 call debounce jb key1,chkkey8 jnb key1,$ mov @r0,#07h inc r0 mov lcddatabus,#'7' call lcddata chkkey8 jb key2,chkkey9 call debounce jb key2,chkkey9 jnb key2,$ mov @r0,#08h inc r0 mov lcddatabus,#'8' call lcddata chkkey9 jb key3,chkkey10 call debounce jb key3,chkkey10 jnb key3,$ mov @r0,#09h inc r0 mov lcddatabus,#'9' call lcddata chkkey10 mov a,keypad orl a,#7fh mov keypad,a clr key7 jb key2,chkkey11 call debounce jb key2,chkkey11 jnb key2,$ mov @r0,#00h inc r0 mov lcddatabus,#'0' call lcddata chkkey11 jb key3,chkkey12 call debounce jb key3,chkkey12 jnb key3,$ jmp back_esc chkkey12 jb key1,chkkeyend call debounce jb key1,chkkeyend mov dptr,#msgplzwait call lcddisp call display_dot jnb key1,$ call check_pw_one jnb 01h,pwd_two jmp correct_pw ;===================================================== ; Program ENDS here ;=====================================================