piclist 2001\02\08\115812a >
Thread: PIC16F84/16F877 ISR SERVO CONTROL
www.piclist.com/techref/microchip/ios.htm?key=servo
flavicon
face BY : 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
servos.
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.


<4.3.2.7.2.20010208115005.00e16170@mail.cedar.net>

In reply to: <20010208161848.57543.qmail@web12608.mail.yahoo.com>
See also: www.piclist.com/techref/microchip/ios.htm?key=servo
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) PIC16F84/16F877 ISR SERVO CONTROL

month overview.

new search...