Advertisement
Guest User

Untitled

a guest
May 27th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. .equ loop_count = 62
  2. .def iH = r25
  3. .def iL = r24
  4. .def countH = r17
  5. .def countL = r16
  6.  
  7. .macro halfSecondDelay
  8. ldi countL, low(loop_count) ; 1 cycle
  9. ldi countH, high(loop_count)
  10. clr iH ; 1
  11. clr iL
  12. loop: cp iL, countL ; 1
  13. cpc iH, countH
  14. brsh done ; 1, 2 (if branch)
  15. adiw iH:iL, 1 ; 2
  16. nop
  17. rjmp loop ; 2
  18. done:
  19. .endmacro
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement