Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ORG 00H
- JMP BEGIN
- BEGIN:
- MOV DPTR,#TABLE
- MOV R0,#0
- LOOP:
- CLR A
- MOVC A,@A+DPTR
- MOV P0,A
- CALL KEYIN
- INC DPTR
- INC R0
- CJNE R0,#10,LOOP
- CALL DELAY
- JMP BEGIN
- DELAY:
- MOV R6,#200
- $1: MOV R7,#200
- DJNZ R7,$
- DJNZ R6,$1
- RET
- KEYIN:
- JNB P1.0,$
- JB P1.0,$
- RET
- TABLE:
- DB 11000000B
- DB 11111001B
- DB 10100100B
- DB 10110000B
- DB 10011001B
- DB 10010010B
- DB 10000010B
- DB 11111000B
- DB 10000000B
- DB 10010000B
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement