Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ORG 0H
- INTIAL:
- MOV DPTR,#TABLE
- NUMLOOP:
- MOV R2,#0
- LOOP:
- MOV A,R2
- MOVC A,@A+DPTR
- MOV P0,A
- CALL DELAY_1S
- MOV P0,#00000000B
- CALL DELAY_1S
- XCH A,R2
- ADD A,#1
- XCH A,R2
- CJNE R2,#10,LOOP
- JMP NUMLOOP
- ;DELAY_1S
- DELAY_1S:
- MOV R7,#10
- DELAY_1Sa3:
- MOV R6,#200
- DELAY_1Sa2:
- MOV R5,#248
- NOP
- DELAY_1Sa1:
- DJNZ R5,DELAY_1Sa1
- DJNZ R6,DELAY_1Sa2
- DJNZ R7,DELAY_1Sa3
- RET
- TABLE:
- DB 11111100B;0
- DB 01100000B;1
- DB 11011010B;2
- DB 11110010B;3
- DB 01100110B;4
- DB 10110110B;5
- DB 00111110B;6
- DB 11100000B;7
- DB 11111110B;8
- DB 11100110B;9
- DB 10011100B;C
- TABLEID:
- DB 0
- DB 0
- DB 7
- DB 6
- DB 10
- DB 0
- DB 3
- DB 3
- END
Add Comment
Please, Sign In to add comment