Hello Rob, My application uses 2 servo motors, here is what I do and it works well: in a loop: - Set high bits bits that act as signals for the servos: - Wait 1mSec - Set low the bits of the motors that needs to be on one side. - Wait 0.5mSec - Set low the bits of the motors that needs to be on the center. - Wait 0.5mSec - Set low the bits of the motors that needs to be on the other side. - Wait 18mSec. You can have as many motors as you want (as you have enough bits). I use one timer to measure the time. The only important issue is to reset the timer before deciding which bits needs to change, otherwise, the motors might jitter due to pulse width variations. If you do this, it can work with 4MHz and only one timer and not interrupts are needed, so even , a 16c54 could be used. Chaipi At 08:18 08/02/01 -0800, Robert Shady wrote: >I'm working on a project (currently using the >PIC16F84) in which I would like to be able to set the >servo (1-8) to a specific setting (1=Extreme >left/128=center/255=extreme right -- or whatever) >somewhere in the main loop, and have an interrupt take >care of actually maintaining that setting in the >background. I'm writing this is MPASM/GPASM for speed >& compatibility. > >I've looked at a number of servo control source, and I >haven't found anybody else doing it this way (it >appears everyone dedicates a 16f84 to this task). I >figure this would have to be table driven, but just >can't get this to work. The timing is something else >I'm having trouble getting just right. Both chips are >clock externally w/a 20mhz crystal. > >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'm not new to programming (just new to PIC's), and >it's killing me that I can't figure this out. I've >been working it for days now... I can send the code I >have currently if anybody is interested.. > >-- Rob > > >__________________________________________________ >Do You Yahoo!? >Get personalized email addresses from Yahoo! Mail - only $35 >a year! http://personal.mail.yahoo.com/ > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads