To Design a microcontroller based system for simple applications like security
systems combination lock etc.
PROCEDURE:1. Read number of bytes in the password
2. Initialize the password
3. Initialize the Keyboard Display IC (8279) to get key and Display
4. Blank the display
5. Read the key from user
6. Compare with the initialized password
7. If it is not equal, Display ‘E’ to indicate Error.
8. Repeat the steps 6 and 7 to read next key
9. If entered password equal to initialized password, Display ‘O’ to indicate open.
PROGRAM:
MOV 51H,#
MOV 52H,#
MOV 53H,#
MOV 54H,#
MOV R1,#51
MOV R0,#50
MOV R3,#04
MOV R2,#08
MOV DPTR,#FFC2
MOV A,#00
MOVX @DPTR,A
MOV A,#CC
MOVX @DPTR,A
MOV A,#90
MOVX @DPTR,A
MOV A,#FF
MOV DPTR,#FFCO
LOOP: MOVX @DPTR,A
DJNZ R2,LOOP
AGAIN: MOV DPTR,#FFC2
WAIT: MOVX A,@DPTR
ANL A,#07
JZ WAIT
MOV A,#40
MOVX @DPTR,A
MOV DPTR,#FFCO
MOVX A,@DPTR
MOV @R0,A
MOV A,@R1
CJNE A,50H,NEQ
INC R1
DJNZ R3,AGAIN
MOV DPTR,#FFCO
MOV A,#OC
MOVX @DPTR,A
XX: SJMP XX
NEQ: MOV DPTR,#FFCO
MOV A,#68
MOVX @DPTR,A
YY: SJMP YY
RESULT:
Thus the program for security lock system was executed
systems combination lock etc.
PROCEDURE:1. Read number of bytes in the password
2. Initialize the password
3. Initialize the Keyboard Display IC (8279) to get key and Display
4. Blank the display
5. Read the key from user
6. Compare with the initialized password
7. If it is not equal, Display ‘E’ to indicate Error.
8. Repeat the steps 6 and 7 to read next key
9. If entered password equal to initialized password, Display ‘O’ to indicate open.
PROGRAM:
MOV 51H,#
MOV 52H,#
MOV 53H,#
MOV 54H,#
MOV R1,#51
MOV R0,#50
MOV R3,#04
MOV R2,#08
MOV DPTR,#FFC2
MOV A,#00
MOVX @DPTR,A
MOV A,#CC
MOVX @DPTR,A
MOV A,#90
MOVX @DPTR,A
MOV A,#FF
MOV DPTR,#FFCO
LOOP: MOVX @DPTR,A
DJNZ R2,LOOP
AGAIN: MOV DPTR,#FFC2
WAIT: MOVX A,@DPTR
ANL A,#07
JZ WAIT
MOV A,#40
MOVX @DPTR,A
MOV DPTR,#FFCO
MOVX A,@DPTR
MOV @R0,A
MOV A,@R1
CJNE A,50H,NEQ
INC R1
DJNZ R3,AGAIN
MOV DPTR,#FFCO
MOV A,#OC
MOVX @DPTR,A
XX: SJMP XX
NEQ: MOV DPTR,#FFCO
MOV A,#68
MOVX @DPTR,A
YY: SJMP YY
RESULT:
Thus the program for security lock system was executed
SYSTEM DESIGN USING MICROCONTROLLER
Reviewed by enakta13
on
August 29, 2012
Rating: