I have been trying to generate different frequency and duty PWM waveforms by injecting values into TCNT register during bootup and inside the timer overflow vector ISR. My expected frequency( as per my timer calculations) and my received PWM output for the code is fine upto certain TCNT value(approx TCNT0=180). Once I set the TCNT0 register above approx 180. I am getting a frequency that does not match up with my calculations. I would like to know if this is due to some sort of limitation with the 8 bit timer OVF vector ISR itself.