> 40 KHz That helps. > It needs to vary one side to the other of that 40 KHz just for tweaking > purposes That's a bunch of meaningless weasel words. What does "tweaking" mean, +-1%, 10%, 100%? What resolution? >>> How pure does the sine wave have to be? > > Not necessarily pristine, but the cleaner the better, probably. At > least to the point of diminishing returns. More qualitative weasel words that are useless in a specification. Let's say you need 40KHz +-1% with no more than 5% distortion. The PIC should be able to generate a square wave to match the frequency specs. Now you need to convert that to a sine wave, which is pretty easy to do with analog electronics. The frequency content of a square wave is the fundamental with rather strong odd harmonics. That means the lowest frequency that must be filtered out it 3 times higher than the one to pass. I don't remember off hand the amplitude of the 3rd harmonic, but let's say it's equal to the fundamental and ignore the remaining harmonics just to get a ballpark estimate. You therefore need to attenuate the 3rd harmonic 20x compared to the fundamental. A perfect integrator will do a relative attenuation of 3x, so at least 3 such stages are required. This means a 3 pole R/C low pass filter could do it, but 4 poles would allow the rolloff frequency to be higher and the resulting in a little less amplitude variation as the frequency is tweaked. So, something as simple as 4 resistors and 4 capacitors could do the job within your very loose "specification". A better answer requires a better specification. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu