i want interrupt every 20ms.this code is not invoking the isr. where is the problem ? plz help.
{
TCNT1=-625;
TCCR1A=0x00;
TCCR1B=0x04;
TIMSK|=(1<<TOIE1);
sei();
You didn't mention which MCU you are using. Obviously it's an AVR, but which one?
This code compiles and the ISR is not triggered? Because "TIMSK" seems that should be accessed as "TIMSK1", even though we still don't know which MCU is used.