Advertisement
jh_elec

Untitled

Sep 7th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. .include <m32def.inc>
  3. .equ fc = 16000000 ; Prozessortakt (default)
  4.  
  5.  
  6. .cseg
  7.  
  8. .def tmp = R16
  9. .def tgl = R17
  10. .def cnt = R18
  11.  
  12. init:
  13. ldi tmp , 1<<4
  14. out DDRD , tmp
  15. ldi tgl , 1<<4
  16.  
  17. tgrel:
  18. eor tmp , tgl
  19. out PORTD , tmp
  20. rcall delay1ms
  21. rjmp tgrel
  22.  
  23. delay1ms:
  24. .equ c1ms = 65000;
  25. ldi R25,HIGH(c1ms)
  26. ldi R24,LOW(c1ms)
  27. delay:
  28. sbiw R24,1 ; herunter zaehlen
  29. brne delay ; zaehle bis Null
  30. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement