Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <avr/io.h>
  2. #include <avr/interrupt.h>
  3. #include <util/delay.h>
  4. void init(void);
  5.  
  6. unsigned int szamlalo=0;
  7.  
  8. void kiir(void);
  9. int main()
  10.  
  11. {
  12.  
  13. init();
  14.  
  15. while(1)
  16. {
  17.  
  18. TCCR0=6;
  19. TIMSK=1;
  20. sei();
  21.  
  22. }
  23.  
  24. return 0;
  25. }
  26.  
  27. void init(void)
  28. {
  29. DDRD=DDRB=0xF0;
  30. PORTD=PORTB=0;
  31.  
  32. DDRA=0xFF;
  33. PORTA =0;
  34.  
  35. DDRC=0b11111000;
  36. PORTC=0;
  37.  
  38. }
  39. ISR(TIMER0_OVF_vect)
  40.  
  41. {
  42.  
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement