The other post is getting long, so i'll start this one. old one is
here:
http://groups.google.com/group/jallib/browse_thread/thread/5e7226634998e174/8b752a9b2558d072#8b752a9b2558d072

So, I just commited another one. I am treating this as an analog
device instead of defined step intervals (such as 10us), you can see
the benifit (better resolution)

pulses 8 servo's one at a time. 2 ISR's for each servo, so 16 ISR's in
20ms.

Uses 8 bit timer for now, I can upgrade to 16bit timers. The user will
have an option. I need to discuss how a user can choose a timer, what
registers are alike on all PIC's, etc. I will make a new post soon.

If upgraded to 16 bit timer, the resolution (step timing) will be
better. With an 8 bit timer & 20mhz, there are 195 possible movement
positions. With a 16 bit timer, there will be about 3200 movement
positions. It is mapped to 255 (8 bit), and will be mapped to a word
with 16 bit timer.

2.5ms / # of movement positions = step size in microseconds

with 48mhz osc + 16 bit timer, there will be around 6500 possible
movement positions. The library calculates the best possible
resolution depending on osc & timer size and sets the prescaler

I tested this on various crystal speeds.

seb, you can turn off servo's

I will test I2c again tomorrow, but I'm sure this is the best we'll
get.

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to