#include #include #include unsigned char a=0, b=0; SIGNAL(SIG_OVERFLOW0) { a++; } SIGNAL(SIG_OVERFLOW2) { b++; } int main(void) { TCCR0=_BV(CS00); TCCR2=_BV(CS01); TIMSK=_BV(TOIE0)|_BV(TOIE2); sei(); for (;;) { //Wait 10us @ 8 MHz _delay_loop_2(20); } }