Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. /*
  2. * TESTBOARDV1_PCBWAY_LED_OUTPUTTEST.cpp
  3. *
  4. * Created: 25/03/2017 10:20:54
  5. * Author : toon
  6. */
  7.  
  8. #ifndef F_CPU
  9. #define F_CPU 16000000UL // 16 MHz clock speed
  10. #endif
  11.  
  12. #include <avr/io.h>
  13. #include <util/delay.h>
  14. #include <avr/interrupt.h>
  15.  
  16. int main(void)
  17. {
  18. DDRB = (1<<PINB1);
  19.  
  20. while(1)
  21. {
  22.  
  23. PORTB = (1<<PINB1);
  24. _delay_ms(500);
  25. PORTB &= ~(1<<PINB1);
  26. _delay_ms(500);
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement