Arduino Uno CTC mode interrupt is not tiggering I am trying to generate LED blink after 4 second using Interrupt  but Interrupt is not triggering not even once .
Request: if you have arduino uno r3 please check at your end and let me know result.
I have read Timer counter section multiple times and applied everything i can for example :-


Enabled Global Interrupt
Select CTC Mode
Enable Interrupt for OCIE0A
Prescaling to clk/1024
Initializing OCR0A
When OCR0A equal TCNT0 ,interrupt will generate


int var;
void setup() {
  // put your setup code here, to run once:
    SREG = SREG | (1&lt;&lt;7);          // Gloval interrupt enable
    TCCR0A = TCCR0A | (1&lt;&lt;WGM01); // Clear counter on compare match mode
    OCR0A = 255; // when TCNT equal OCR0 interrupt will generate
    TIMSK0 = TIMSK0 | (1&lt;&lt;OCIE0A); //  Output Compare Match A Interrupt Enable
    TCCR0B = TCCR0B | (1&lt;&lt;CS01) | (1&lt;&lt;CS02);  // Prescaling by 1024
    DDRB = DDRB | (1&lt;&lt;5); 
    Serial.begin(9600);      // Testing 
    Serial.println("Start");   // Testing
}

void loop() {
  // put your main code here, to run repeatedly:

}

ISR(TIMER0_COMPA_vect){
    var++;
    Serial.print(var); // Testing
    volatile long unsigned i;
    if(var == 246){
        PORTB = PORTB | (1&lt;&lt;5);
        for(i=0; i&lt;30000; i++);
        PORTB = PORTB &amp; ~(1&lt;&lt;5);
        for(i=0; i&lt;30000; i++);
        var=0; 
    }
}



clock is 16 00 00 00 Hz
Prescaling by 1024 = 15625
1 Tick = 1/15625 = 0.00 00 64 sec
OCR0 is initialized by 255
TCNT0 Ticks to 255
Total time taken to generate one interrupt = 255 * 0.00 00 64 =
0.01632 sec that means after every  0.01632 sec Interrupt supposed to generate
How many interrupt is required to generate LED after 4 sec =>
4/0.01632 = 246


Update working code 

int var;
void setup() {
  // put your setup code here, to run once:
  SREG = SREG | (1&lt;&lt;7);          // Gloval interrupt enable
  TCCR0A =(1&lt;&lt;WGM01); // Clear counter on compare match mode
  OCR0A = 255; // when TCNT equal OCR0 interrupt will generate
  TIMSK0 = (1&lt;&lt;OCIE0A); //  Output Compare Match A Interrupt Enable
  TCCR0B = (1&lt;&lt;CS00) | (1&lt;&lt;CS02);  // Prescaling by 1024


  DDRB = DDRB | (1&lt;&lt;5); 

    Serial.begin(9600);      // Initialize the USART  
    Serial.println("Start");   // Write the welcome message

}

void loop() {
  // put your main code here, to run repeatedly:

}

ISR(TIMER0_COMPA_vect){
  var++;
 // Serial.print(var);
  volatile long unsigned i;
  if(var == 246){
        PORTB = PORTB | (1&lt;&lt;5);
        for(i=0; i&lt;300000; i++);
        PORTB = PORTB &amp; ~(1&lt;&lt;5);
        var=0; 
  }
}
There are a few issues with your code:

First, you should completely overwrite the timer control registers
rather than changing single bits. For example, when you write

TCCR0A = TCCR0A | (1&lt;&lt;WGM01); // Clear counter on compare match mode


You end up with a timer mode that results from the combination of the
bits that were already set there and the ones you are setting. Judging
from the comment, you assume that this will be CTC mode, but this is not
granted, because the Arduino initialization routine has already set some
bits in this register. Since you are taking the timer for your own
usage, just overwrite all the control registers:

TCCR0A = (1&lt;&lt;WGM01); // Clear counter on compare match mode


and same for TCCR0B and TIMSK0.

The second problem is that you misread the “Clock Select Bit
Description” table from the datasheet. Your timer is being clocked from
an external clock source on T0 pin. Presumably you have nothing
connected there, so the timer does not increment. You probably meant

TCCR0B = (1&lt;&lt;CS00) | (1&lt;&lt;CS02);  // Prescaling by 1024


A smaller issue is your delay loop. The program would be easier to
understand if you instead use a proper delay function. The Arduino
delay() will not work, as you have reconfigured Timer 0, but you can
use _delay_ms() from the avr-libc if you #include &lt;util/delay.h&gt;.