I know this is silly but I got really confused.
I want to make a PWM pulse with 3 modes on Atmega16: 1- 1Khz with Duty cycle 100% 2- 4Khz with Duty cycle 100% 3- 1Khz with Duty cycle 50%
I was away from AVR for almost 2 years and I forgot everything, so I just need the calculations of Timer 1 in a simple way. any thing I have read makes me more confused. Is there something that could help me? I'm using Codevision AVR.
I did this, but I got exams so it got too long to post it. I set the Fcpu to 4MHz
and here is the code: