Guest User

Untitled

a guest
Oct 8th, 2011
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. /*
  2. * stepper.c
  3. *
  4. * Created: 07.10.2011 22:14:23
  5. * Author: nharghazz
  6. */
  7.  
  8. #ifndef F_CPU
  9. #define F_CPU 16000000UL
  10. #endif
  11.  
  12. #include <avr/io.h>
  13. #include <util/delay.h>
  14.  
  15. int main(void)
  16. {
  17.  
  18. DDRA=0xff;
  19.  
  20. while(1)
  21. {
  22. PORTA = (1 << 0);
  23. _delay_ms(1);
  24. PORTA = (0 << 0);
  25. _delay_ms(1);
  26. }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment