On Thu, Sep 8, 2011 at 9:54 PM, David Duffy (AVD) wrote: > Josh, the basic idea is: > > Set up a free running 20ms timer on tmr0. > > When tmr0 fires, set the first servo output high and set tmr1 to the > pulse width you want for servo 1. > > When tmr1 fires, turn servo output 1 off, turn servo 2 output on and set > tmr1 to the pulse width you want for servo 2. > > Repeat unitl all servos are serviced, then wait for the 20ms timer to > fire again. > > This round robin works for up to 8 servos as 8 x 2ms =3D 16ms so you can > service them all within the 20ms. =A0The pulse positions move about > somewhat within each 20ms event, but the servos don't seem to mind. Ok, that's what I figured. Is there a clever way to save a timer and integrate it all into one? That's where I was headed with my comments before. I don't know if this is possible, but could you have say TMR3 generating the 20mS interrupt, then use the CCP module on TMR3 to generate the pulse width? I haven't had the time to do the math to see if that would work, but I have no idea if it's even within the realm of possibility. Thanks! Josh --=20 A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. =A0 =A0 =A0 =A0 -Douglas Adams --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .