Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .equ loop_count = 62
- .def iH = r25
- .def iL = r24
- .def countH = r17
- .def countL = r16
- .macro halfSecondDelay
- ldi countL, low(loop_count) ; 1 cycle
- ldi countH, high(loop_count)
- clr iH ; 1
- clr iL
- loop: cp iL, countL ; 1
- cpc iH, countH
- brsh done ; 1, 2 (if branch)
- adiw iH:iL, 1 ; 2
- nop
- rjmp loop ; 2
- done:
- .endmacro
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement