Advertisement
ivosexa

Untitled

Nov 8th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #define F_CPU 1000000UL
  2. #include <avr/io.h>
  3. #include <util/delay.h>
  4. int main(void)
  5. {
  6.  
  7. DDRB = 0xff;
  8. TCCR1A |= 1<<WGM11 | 1<<COM1A1 ;
  9. TCCR1B |= 1<<WGM13 | 1<<WGM12 | 1<<CS10;
  10. ICR1 = 1023;
  11.  
  12. PORTB |= 1<< PB0;
  13. OCR1A =512;
  14.  
  15.  
  16. while (1)
  17. {
  18.  
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement