I have done exactly this, but in C, not assembler. I did use some inline asm code in the ISR for better control of the timing. I don't think I can share the source code with you since I did the job for someone else, but I could possibly help you do something similar if you want. In application I use a 16F84 to control the servo and do some sonar ranging and serial communication, all of which uses a little under 50% of the available program space. Dale On Thu, 8 Feb 2001, 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. > > --- The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny ..." -- Isaac Asimov -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.