Tim Forcer wrote... >You are not restricted to PICs with PWM outputs! You can use a look-up >table for a one-bit oversampled waveform just as easily as for multi-bit >sampling. The main advantage of using a software DDS approach (i.e., a sine lookup table together with a PWM output or DAC) is that you can get a sine wave which is both easily tunable--simply by varying the phase increment register value--and capable, with appropriate output filtering, of generating a high-quality sinusoidal output. And in contrast to a tunable analog oscillator (a Wein bridge arrangement, for example), the tuning is repeatable as well. In one implementation I'm using a PIC16F877 and a 12-bit DAC to generate a 0-10KHz sine wave, tunable in 0.002Hz increments with THD around 0.1% over the range. You wrote of using 1-bit oversampled binary coding, 64 samples per cycle; I'd be interested in knowing how well this lends itself to tuning over a wide frequency range while maintaining spectral purity. My guess would be that while generating fixed-frequency sine waves with this technique is straightforward, generating sine waves continuously tunable over a wide range is not; but I'm open to being corrected on this point. Dave D. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu