i checked PWM output with a scope.I first disabled interrupt and let TACCR1=100 and output is a 20% duty cycle and then i let TACCR1=400 and i get a 80% duty cycle PWM. Then i enabled interrupt using the code above but the output is a couple of PWM signals and then zero and after a while PWM signals and then zero..
so i think ISR is running because it's affecting the results but it's not running properly.Do i write the code wrong?
By the way i left out an infinite loop while(1) at the end of the main function.