PIC16F84/16F877 ISR SERVO CONTROL
David VanHorn email (remove spam text)
>I can't believe I am the only person that has ever
>wanted to do this, does anybody out there have any
>examples I can look at that perhaps I've missed?
I can't help you with pic code, but my AVR code does exactly that, on eight
I use two timers, One is the opsys tick, which does a lot of other things,
including scheduling the servos, and starting the output pulse. The other
timer is loaded with the output pulse width. When it interrupts, the servo
pulse is shut off.
You can probably do a similar thing on the F84, except that you don't have
the second timer to do the pulse width, so you'd have to do it in some sort
of "sit and spin" loop.
A warning: Not all servos are satisfied by the typical 1-2mS pulse time.
In my code, I have equates for servo types that set the min/max pulse width
appropriately, so all the application needs to do is set a servo position
byte in ram from 0-255 and the result is always the same position (within
reason) even between different servo brands.
Dave's Engineering Page: http://www.dvanhorn.org
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
In reply to: <firstname.lastname@example.org>
See also: www.piclist.com/techref/microchip/ios.htm?key=servo
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the