Bob Blick wrote: > On Thursday, September 08, 2011 6:29 PM, "Josh Koffman" wrote: > =20 > =20 >> Oops, forgot to mention I'm looking for assembly code. I've found a >> bunch of C code, but that's not something I can do properly. >> =20 > > I usually use a CCP peripheral in Compare mode to generate the pulse. > Use a general purpose timer to let you know when to repeat. > > If you need to drive more than one servo you should hit them all > round-robin style, and you can use the same CCP output pin to do it as > an enable for diode/CMOS/TTL logic to "AND" it with a set of general > purpose output pins. Or you can use a 3-to-8 demultiplexer, etc. > > But basically use the CCP compare output pin. Sorry I have only done it > in a 16F in C. > > Cheerful regards, > > Bob > > =20 There is also JAL servo library for 16F, 18F You can compile it (all free) and see the Assembler it produces (with=20 source and symbols) as well as the HEX. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .