This process intrigues me.  I've built a serial servo controller using a very direct approach... serial interrupts and a main loop that services the controllers.  The interrupt replaces values in a position array after it sucks in the serial stream.  This is not the way to do it if you want continuous updates. Just getting the bits from the serial stream will hose the timing for the servos - meaning, if you get an interrupt right after you turn the servo on, there will be a couple of ms delay while the bits are clocked in ... that screws up the servo timing. The result is jitter. However, with intermittent updates (say, driving the wheels on a robot), the process works just fine.
 
There are a couple of solutions on the web that essentially share the serial input with the servo timing.  I'm still trying to get my arms around them but they seem to be the way to do it.  The one at: http://mks.niobrara.com/microtools.html seems like it would work, but it requires a 9.8xxx mhz crystal.
 
Are there any other solutions out there that use standard clocks and have solved the jitter problem?  I understand that Scott Edward's solution was published in 1994 by Scott, but I can't find a source on the web for it.
 
 
Dan
-----Original Message-----
From: Anthony Clay <adctemp@HOTMAIL.COM>
To: PICLIST@MITVMA.MIT.EDU <PICLIST@MITVMA.MIT.EDU>
Date: Tuesday, July 20, 1999 10:04 AM
Subject: Hey Myke! Web page update

No real new documentation on the Pic-Flyer,  but my PIC projects section has a new "advanced servo control techniques and algorithms" page.
 
While brainstorming I came up with a way to control more servos with less processor time (processor time being measured in percentages of one full second.  I may have found a way to control lots of servos, more than 12, and only use 24% of the processor!  I did this by coming up with this great idea:
 
Instead of "looping" to generate timed delays, why not just use some advanced interrupt handler to make better use of that wonderful tmr0.  The interrupt would work like this:
 
Begin interrupt (triggered by timer0 every 18mS)
   
    reload timer0 to overflow in 1mS
    Set the pulse output pin high and an interrupt_flag high
    Return from interrupt
 
    Main-line code
 
    Begin interrupt again (1mS later)
    Check to see if flag is high
        If so, generate the rest of the delay "manually" (If you are using a *really* fast processor, 20MHz, try         generating the entire pulse with an interrupt.
    Once the delay is over, set the output pulse low.
    Set up timer0 to return control in another 18mS
Return from interrupt
 
In a nutshell, the entire idea is to provide more execution time to the main-line code, in the PICFlyer, my servo controller must also handle 2-wire serial communications, ( a later project. )
 
I posted the document to illustrate a technique I though would be a good contribution to the list.  Speaking of the list, could someone please append my name and site to David Tait's, now defunct, list of hobbyists?
 
Login: at www.intcon.net/~jrclay
Goto: PIC Projects
Goto: Servo Controllers and algorithms
 
I have not yet posted the code for the Serial-Parallel controller, just a single servo controller,  I am still working the the method described above
 
Myke P. : Your comments please.