Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $MOD842
- ORG 00H
- JMP START
- ORG 33H
- MOV A, ADCDATAH
- ANL A, #0Fh
- RL A
- RL A
- RL A
- RL A
- MOV B, A
- MOV A, ADCDATAL
- ANL A, #0F0h
- RR A
- RR A
- RR A
- RR A
- ORL A,B
- MOV B, #10
- DIV AB
- ANL B, #0Fh
- MOV R0,B
- MOV B, #10
- DIV AB
- ANL B, #0Fh
- ORL B, #10h
- MOV R1, B
- ANL A, #0Fh
- ORL A, #20h
- MOV R2, A
- RETI
- START:
- MOV IE,#0C0h
- MOV ADCCON1,#82h
- SETB TR2
- PETLA:
- MOV P2, R0
- CALL DELAY
- MOV P2, R1
- CALL DELAY
- MOV P2, R2
- CALL DELAY
- JMP PETLA
- DELAY:
- MOV R4,#10h
- DLY0: MOV R5,#10h
- DLY1: MOV R6,#10h
- DJNZ R6,$
- DJNZ R5,DLY1
- DJNZ R4,DLY0
- RET
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement