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?
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.