> Yes, the PWM module cannot achieve the low duty cycles required while > maintaining adequate resolution. If I recall correctly I think if I was > willing to tolerate 10ms pulse spacing (instead of 20) then it would have > functioned but with very low resolution and I was told the short pulse > spacing may have upset some servos. (Don't quote me, I'm speaking from > memory - but I'd wanted to use the PWM module and was forced to reject that > idea) >=20 > The way I do it now is to set the TMR0 prescaler to 256, which gets me > something like 12 or 13ms until the interrupt. The first time it interrupts > it resets the prescaler to 128 and returns which delivers the remaining 7 or > 8ms. The second time the interrupt is triggered it sets all the servo lines > high for 1ms followed by an additional 0 to 1ms. In this way I get 8bit > pulse width resolution but still have the processor yielded for > communications about 90% of the time. I'm not saying this is the best > way... but it was the only way I could come up with to combine control of > multiple servos, good resolution, serial communication, 6 ADCs for > measurements, and fast 20MHz clock for computation. >=20 > Drew OK, I have a feeling you could possibly select a better chip for the job - seriously. The chip you have is not a nanowatt part - from what I can make out from the Microchip site, it won't let me look at the page for that chip currently. There are PIC24 chips that are nanowatt, and I suspect you probably want to be saving all the power you can in a pilotless drone. This may or may not be a consideration, it is not clear to me if you are attempting a solar powered drone or not. As indicated above you are having problems with PWM resolution. PIC24 PWM channels have 16 bit resolution in place of the 5/6/7/8/10 bit that that the 16F series do. And they have a heap of hardware channels that will do it for you - as Olin said, set and forget. The largest chips do have 5 hardware PWM channels and 4 UART channels. There is also a number of SPI channels that could be used (with a bit of thought) as PWM channels, with 16 stages of resolution, by transmitting a 16 bit word with the appropriate bits set, at a timer interrupt determined interval. Set the SPI clock to make the 16 bits 2.5mS long if that gives you enough resolution, or stuff a number of 16 bit words into the SPI Tx FIFO with a suitably faster clock to achieve better resolution. You are already using a 40/44 pin part, so going to a large pin count PIC24 won't be a hardship. Use the best tool for the job, instead of make do and mend. --=20 Scanned by iCritical. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .