Wow, that's steep. Generally, for more accuracy/repeatability, I find it better to=20 pre-calculate what would happen next, and as soon as the interrupt is=20 entered, first set the output to the previously pre-calculated value,=20 then go ahead and pre-calculate for the next time, before leaving the=20 interrupt. Cheers, -Neil. On 1/2/2015 11:48 AM, Luis Moreira wrote: > I can and did before, but it always seemed a bit messy. Apart from the > timer you also need to take into account instructions time and such. Need > 1uS resolution. > Best Regards > Luis > On 2 Jan 2015 16:41, "Neil" wrote: > >> Any reason you can't create your own PWM using a timer interrupt? >> >> Cheers, >> -Neil >> >> >> On 1/2/2015 7:22 AM, Luis Moreira wrote: >>> Hi Guys, >>> need a 8 pin PIC that ideally would have 2 PWM but must have SPI, found >>> PIC12F1822 and PIC12F1840 but they only have one PWM. >>> I am driving one single rc servo but requirements may change to need to >>> drive the motor directly with an H - bridge. >>> Any info on these two micros regarding any problems encontrered or any >>> other device that would fit the bill would be apreciated. >>> Best Regards >>> Luis >> -- >> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .