i'm trying to implement servos in one of my projects - however pretty much
every bit of code I came up with uses the delay or delayMicroseconds function -
and thus stops execution of the main program for the time the signal is generated.
The other option i went after was using PWM with analogOut - however the only
usable PWM-frequency for driving servos would be 8ms (via CPU clock divider),
which leaves a mere 64 possible servo positions (8ms = 256 => 2ms (servo pulsewidth) = 256/4 = 64).
So my questions are:
-How can i set the frquency of the PWM output more accurately
(say 50hz for servo applications)?
-How can i set the resolution of the PWM to 10 or probably 12 bits?
-Are there any better ways/ ideas how to drive servos without interrupting
the execution of the main program for a longer period of time?
Thanks for your upcoming ideas