Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // check if no. of overflows = 12
- if (tot_overflow >= 12) // NOTE: ‘>=’ is used
- {
- // check if the timer count reaches 53
- if (TCNT0 >= 53)
- {
- PORTC ^= (1 << 0); // toggles the led
- TCNT0 = 0; // reset counter
- tot_overflow = 0; // reset overflow counter
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement