prjbrook

TinyFlashA.asm

Jul 25th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. ;three counters r17,r18,r19 loop 256*256*9 * 484uS = about 1 second at 1.6MHz
  2. .include "tn15def.inc"
  3. start:
  4. ldi r16,$ff
  5. out DDRB,r16
  6. ;above sets DDRB to all outputs
  7. start2:
  8. ldi r16,$00
  9. out PORTB,r16
  10. clr r17
  11. clr r18
  12. ldi r19,$09
  13. up: dec r17
  14. brne up
  15. dec r18
  16. brne up
  17. dec r19
  18. brne up
  19. ;now do loop with all 1's
  20. ldi r16,$ff
  21. out PORTB,r16
  22. clr r17
  23. clr r18
  24. ldi r19,$09
  25. up2: dec r17
  26. brne up2
  27. dec r18
  28. brne up2
  29. dec r19
  30. brne up2
  31. nop
  32. rjmp start2
Advertisement
Add Comment
Please, Sign In to add comment