Advertisement
martin2250

Pin Change AVR

Nov 1st, 2014
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.15 KB | None | 0 0
  1. void main()
  2. {
  3.     setup();
  4.    
  5.     while(1)
  6.     {
  7.         doStuff();
  8.        
  9.         PCICR = _BV(PCIE0);
  10.         sleep();    //powerdown
  11.     }
  12. }
  13.  
  14. ISR(PCINT0_vect)
  15. {
  16.     PCICR = 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement