Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MOV R1,#0FFh ; Acc holds delay variable (1 clock)
- DLY0: MOV R2,#0FFh ; Set up delay loop0 (2 clocks)
- DLY1: MOV R3,#08h ; Set up delay loop1 (2 clocks)
- DJNZ R3,$ ; Dec R3 & Jump here until R3 is 0 (3 clocks)
- DJNZ R2,DLY1 ; Dec R2 & Jump DLY1 until R2 is 0 (3 clocks)
- DJNZ R1,DLY0 ; Dec R1 & Jump DLY0 until R1 is 0 (3 clocks)
- RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement