Code Select
__disable_interrupt(); // disable interrupt
TCCR0A = 0x02; // CTC, normal operation
TCCR0B = 0x02; // prescaler8
OCR0A = 125; // set value
TIMSK0 = 0x02; // Compare Match A Interrupt Enable
TCCR2A = 0x02; // CTC, normal operation
TCCR2B = 0x02; // prescaler8
OCR2A = 125; // set value
TIMSK2 = 0x02; // compare match A interrupt enable
//~ TCCR2A = 0x00; // timer, normal operation
//~ TCCR2B = 0x02; // prescaler8
//~ TCNT2 = 125; // set value
//~ TIMSK2 = 0x01; // Timer/Counter2 Overflow Interrupt Enable
__enable_interrupt(); // enable interrupt