Hi Alex (Alex Holden), in <199712301418.GAA01170@geocities.com> on Dec 30 you wrote: > I think you'll find it isn't quite as simple as that. Timing the length of > a 0.5 to 2 ms pulse occurring anywhere between 50 and 400 times a second > (more usually 50Hz, but depends how many channels the reciever has) is > pretty processor intensive. Trying to do that at the same time as > generating a PWM output on a PIC which doesn't have hardware PWM will > probably be tricky, and I doubt a C compiler would be intelligent enough to > get the two processes working together properly. ?!? Setup a timer int at the rate you wish to output PWM. Then sample the PWM-input during this int, too. If it's low, increase the "low counter", else increase the "high counter". The relation of those two counters represent the duty cycle, no matter what the PWM-in-frequency was. Reset the counters whenever you begin a new PWN-out cycle.