Hi,

2010/1/29 mattschinkel <[email protected]>:
>
> Normal servo range is 10us to 25ms in increments of 10us, I checked
> with my scope, I can increment steps from 1 to 250 (10us up to 2.5ms).
Could you explain why this works?
I would think that 20 Mhz / 4 / 32 = 156 kHz clock for timer0, which
gives 6.4 ms steps, not 5 or 10.

> All servo's will understand a 10us pulse,
This is incorrect. All servos understand 1.5ms pulse, which is
neutral. Normal range is +/- 0.5 ms, but some support up to +/- 1 ms.

> It does not make sense to ask the user to input a value between 80 &
> 235 (actual 10us steps), so I did some calculations to convert it to 0
> to 255. The user only sees movement, they do not see 10us steps.
This is what I am saying: users want to input 0-255 regardless of the
clock rate.
However, I think is is not a good idea to limit min and max based on
the servo you have available. I'd suggest to map 0..255 to 0.5 - 2,5
ms.

> currently, it has only been tested on 20mhz crystal. I don't think I
> can get the 10us with any lower crystal.
Why not?

> Faster is better, eash "hair" will add up to a lot of "hairs". I would
> prefer to not use an array. I thought of this already when I saw the
> timer_interval lib.
Much less program memory required (4 times less with 8 servos is my
rough estimate) is better too, as is more compact source code which is
easier to read, maintain and has less errors.
But since you're are the developer, it is up to you to decide.

Joep

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