Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2014
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. // check if no. of overflows = 12
  2. if (tot_overflow >= 12) // NOTE: ‘>=’ is used
  3. {
  4. // check if the timer count reaches 53
  5. if (TCNT0 >= 53)
  6. {
  7. PORTC ^= (1 << 0); // toggles the led
  8. TCNT0 = 0; // reset counter
  9. tot_overflow = 0; // reset overflow counter
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement