ISR(TIMER0_COMPA_vect)
{
- TCCR0B = 0;
- TCNT0 = 0;
}
int main(void)
TIMSK0 |= (1 << OCIE0A); // Enable CTC interrupt
OCR0A = 0xAA; // CTC compare value
+ //TCCR0B |= (1 << CS00) | (1 << CS01); // Start timer: clk/64
+
sei(); // Enable global interrupts
// here the interupts are enabled, but the interupt
// vector should not be called
- while(1)
- sleep_mode();
+ sleep_mode();
+
+ // this should not be reached
+ cli();
+ sleep_mode();
}