Dave Tweed wrote: > If the hardware PWM doesn't give you the resolution you need, > couldn't you use delta-sigma techniques to keep track of the > accumulated error, and adjust the width of future pulses based on > that? Perhaps a bit of dithering (pseudorandom noise) could be added > to help hide any spurious tones generated thereby. You can dither the PWM duty cycle and get better duty cycle resolution, but note that this introduces additional frequencies below the main PWM frequency. For example, if you are dithering between two duty cycle values in successive cycles, then you introduce noise components at half the PWM frequency. Whether that matters or not depends on the application, but it'= s important to keep in mind the extra resolution isn't free. Of course makin= g the PWM frequency half and using a fixed duty cycle makes the power in the lower PWM frequency much higher. The problem with delta-sigma and accumulated error techniques in general is that you can't guarantee a lower frequency bound of the PWM noise part of the signal, which in turn means it's hard to not have it interpreted as the real signal. Again, there are ways to mitigate this, but it has to be kept in mind. ******************************************************************** 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 .