Go Down

Topic: Will atmega8 handle 6 servos and PWM ? (Read 2780 times) previous topic - next topic


Can anyone answer my quetion : will atmega8 handle 4-6 servos and 2 PWM outputs?


the ATmega 8 has 3 pwm outputs.
You'll need something like a TLC5940NT to control all servos independently.


Can anyone answer my quetion : will atmega8 handle 4-6 servos and 2 PWM outputs?

It depends on how much other stuff the processor is doing - if you're short of timers,  you could bit-bang the servos, or the PWM.
You need to tell us more,like how much jitter or reduced frequency PWM your application can cope with.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


program would be simple only 6 butons 5 servos and 2 motors driven by PWM. Servo and motors control over serial and buttons.


If you want to use PWM from Timer1 (pins 9 and 10), the answer is no. Why? Because the Servo library needs Timer1 to function. So, to be able to use PWM and servos, you need to use either Timer0 (pins 5 and 6) or Timer2 (pins 3 and 11). Timer0 is also used by the millis() and delay() functions, so you can't change the frequency. Also, Timer2 is used by the Tone library, so if you plan on using Tone, better use Timer0 for PWM. This is the way my Robot Builder's Shield (see my blog or store from the signature bellow) is set up: Timer0 for motors PWM signal, Timer1 for servos and Timer2 available for Tone.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131