IMHO, it depends on how accurate a sine waveform you need. The cheapest way to get reasonable tones, I've found, is to use a walking-ring counter with sine-weighted resistors at the output. It gives you a stepped-sine waveform (whose "quantization" you can set by the number of steps in the counter), and the harmonics are far removed from the desired frequency (2n+1, 2n-1 to be precise), so they can be filtered with a 2nd-order active lowpass, or even a simple RC lowpass. Basically, all you need is some shift registers, a clock (square wave) at nX the desired freq, where n is the number of steps you choose in your counter, and some resistors (5% are okay, you will have to do some serial/parallel twirling though). One end of each resistor goes into the shift register outputs, the other ends all tie together (your output), and the last stage is fed to the first through an inverter (NOT). I tried brute-force Fourier, as in just taking a square wave and filtering out all odd harmonics above the fundamental, but I figured it was too complex and expensive (UAF42 might have worked, but it needs a Vcc of 8V, so was out of the question for me). Cheers, Ishaan ----- Original Message ----- From: "John Nall" To: Sent: Monday, June 23, 2003 08:28 Subject: Re: [PIC]: Square wave to sine wave - how? > At 10:36 AM 6/20/2003 -0600, Tim Webb wrote: > > >Burr-Brown has an Application Bulletin on turning square to sine wave. > >see url: > > > >http://focus.ti.com/lit/an/sbfa003/sbfa003.pdf > > Thanks for that. I thought there might be a chip somewhere that would do > that, and the UAF42 (which is what the AB is about) seems to be it. A very > nice active filter, sells for about $11 from Digi-Key. Guess I will order > one and play with it. Thanks again. > > John > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.