I want to count the number of pulses that occurred between a delay of 'n' seconds in atmega32 using 16bit timer and store and display it. `
TCNT1 = 0x0000;
TCCR1A = 0X00;
TCCR1B = 0X01;
_delay_ms(150);
TCCR1B = 0X00;
int K = TCNT1;
Is the above code correct for counting pulses?