How to get a variable frequency generating function for 8 bit TIMER0 in ATMEGA128??

Status
Not open for further replies.

kunal5959

Junior Member level 3
Joined
Jul 26, 2011
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,644
I want to generate 3 different PWM's using ATMEGA128 whose 1)dutycycle and 2)frequencies can be controlled individually for three MOTORS. Its easy to first say --use two 16 bit timer1&3 and one 8 bit timer0or2 and we have 3 controllable PWM's. I see that i actually have full controll of dutycycle in all PWM modes of 8 bit nd 16 bit modes. But, when it comes to frequency in Phase correct or Fast PWM modes I can access a huge range of the PWM frequency only in 16 bit timer modes by varying the ICR register. In 8 bit timer mode only systemFreq can be prescaled at 1,8 32,64,128,256,1024 which limits the usage of only 7 different frequencies..I need to generate a many values of frequencies between 10 Hz to 1000Hz for my Project using ATMEGA128.

Does anyone have the idea how to generate a timer function that can generate PWM with many values of frequencies(10 Hz to 1000Hz) using the 8 bit timers in ATMEGA128?
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…