/* Name: main.c * Author: Nathan Williams * 2011 */ #include #include #define CLOCK_DIV8 TCCR0B = _BV(CS01); #define CLOCK_DIV64 TCCR0B = _BV(CS01) | _BV(CS00); #define CLOCK_DIV256 TCCR0B = _BV(CS02); #define CLOCK_DIV1024 TCCR0B = _BV(CS02) | _BV(CS00); #define TIMER TCNT0 #define TIMER_CLEAR TIMER = 0; #define LED_ON PORTB |= _BV(PB0); #define LED_OFF PORTB &= ~(_BV(PB0)); #define TOGGLE_LED PORTB ^= _BV(PB0); uint8_t overflow_count; void start_timer() { CLOCK_DIV1024; TIMSK |= (1<= 114) //about 30 seconds { TIMSK &= ~(1<