Dave Turner wrote: > Ooooh, me likey. Perfect code for the job. Thank you so much. After > changing the rrf to rrcf, it works great. Thanks again. Actually Dave, Mark's solution may be useful in some application (none of which I'm aware however), but it certainly is of marginal value for an isochronous PWM routine. You probably want Mike Keitz's solution. Once you combine Mike's code with your's and see that it takes nearly 20 cycles per PWM per count interval, you may desire a routine that's an order of magnitude faster. Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist