Go Down

Topic: Can the Servo lib be made to control more than 12 servos per timer? Maybe! (Read 1 time) previous topic - next topic

Graynomad

Thanks Duane, I'm thinking of doing a servo controller (maybe even 32 channel) in the next few months so the above will be useful.

I've seen controllers with 1uS resolution and wondered if that was really necessary, seems like it wouldn't do any harm.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

DuaneB

Hi,

My libraries get upto 20 servos by having two banks of ten, one on OCR1A and the other on OCR1B. I had considered interlacing the two banks on a single compare register but could not come up with a satisfactory way of handling the case where two or more servos need to toggle within a few us of each other.

This is a real problem because you either need to write a more complex isr which blocks for longer, or you risk situations where the timer will advance past the next output compare value before you are able to set it and you loose the frame. Splitting two banks of servos over the two output compare registers solves this quickly and easily at a hardware level.

Duane B


Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Go Up