Gsm Modem Interfacing Essay

1341 WordsMay 6, 20136 Pages
1. LCD.C – 4-Bit LCD Drivers 2. LCD.H – LCD function prototypes and other declerations 3. Lock.C – code for lock functioning 4. LOCK.H – lock function declarations 5. KEYPAD.C – Keypad drivers 6. KEYPAD.H – Function declarations 7. DELAY.C – Delay Functions 8. DELAY.H – Function Prototypes only 9. MAIN.C – Main function! 10. Digital Code Lock Schematic – PDF file of orcad schematic lcd_port equ P3 en equ P3.7 rs equ P3.5 MOB EQU P3.4 lock equ P1.3 LCD_CLR equ 01H LCD_LN1 equ 80H LCD_LN2 equ 0C0H LOCK_i equ 0 UNLOCK_i equ 1 EX_i equ 2 OK_i equ 3 var1 equ r2 temp equ r3 delay equ r4 scan equ r5 iskey equ 0H newcode equ 1H keyval equ r6 status equ r7 max equ 30H count equ 31H length equ 32H retries equ 33H input equ 40H upass equ 50H is_ok equ 2H FALSE equ 0 TRUE equ 1 RETRY equ 2 EXIT equ 3 keyport equ P1 col1 equ P1.0 col2 equ P1.1 col3 equ P1.2 org 00H acall lcd_init acall keypad_init clr iskey mov sp,#60H mov retries,#3 main: mov a,#LCD_CLR acall lcd_cmd mov dptr,#str_enter acall lcd_str mov a,#0C0H acall lcd_cmd mov a,#LOCK_i acall lcd_dat mov a,#':' acall lcd_dat mov max,#5 acall get_input cjne status,#TRUE,main mov dptr,#chk_12345 mov count,#5 acall chk jnb is_ok,main_2 acall set_upass sjmp main main_2: jb newcode,main_3 mov dptr,#chk_upass mov count,#5 acall chk sjmp main_4 main_3: acall chk_newcode main_4: jnb is_ok, main_5 mov retries,#3 clr lock mov a,#LCD_CLR acall lcd_cmd mov a,#OK_i acall lcd_dat mov dptr,#inactive acall lcd_str mov a,#LCD_LN2 acall lcd_cmd mov dptr,#inactive1 acall lcd_str acall delay_1sec mov a,#LCD_CLR acall lcd_cmd mov dptr,#inactive2 acall lcd_str mov a,#LCD_LN2 acall lcd_cmd mov dptr,#inactive3 acall lcd_str main_6: acall get_key cjne keyval,#12,main_6 setb lock mov a,#LCD_CLR acall

More about Gsm Modem Interfacing Essay

Open Document