RNGolding@aol.com wrote: > I'm currently using a PIC18F4423 (but that can be changed if > unsuitable). Generating a 10bit PWM at a single frequency is pretty > straightforward using a suitable master clock frequency and Timer 2 > values but > I can't see how to get other frequencies (via PR2 value) without > losing the 10bit resolution. i.e. setting a PR2 register value below > 255 to set the other frequencies reduces PWM resolution. It sounds like the standard 16/18 PIC CCP module is not suitable for what you are trying to do. You probably want to use some sort of dsPIC, like a 24H. The PWM period generation is much more flexible. Even with the norma= l "output compare" modules, you get PWM period resolution down to one instruction cycle. At the maximum speed of 40 MIPS, you can achieve a minimum of 10 bit resolution at 39 kHz and lower. The duty cycle and perio= d registers are 16 bits, so you have 6 bits of headroom in your case. The lowest PWM frequency you can achieve at 40 MIPS is 610 Hz without any prescaler. Clearly there is lots of room for you to get 10 bit resolution at a range of frequencies. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .