If you have access to the National Semiconductor Linear Applications Data Books, you will find several function generator circuits which use a diode network to create the sine curve. Of course, there is some distortion. However, a fairly good sine curve can be developed at frequencies below 10 MHz. The diode technique is quite common. ----- Original Message ----- From: "Scott Dattalo" To: Sent: Thursday, May 17, 2001 5:25 PM Subject: Re: [EE]: Square Wave Pulse Converted to Sine Wave Pulse > On Thu, 17 May 2001, Freddie Leaf wrote: > > > Hi PICList, > > > > I need to generate a sine wave signal for input to an existing electronic > > circuit. The signal will vary in frequency as a function of some other inputs > > to a 16F877. I'm thinking I could generate a 0V to 5V output pulse with the > > PIC but need a circuit to convert this signal to a +/- sine wave. The > > peak-to-peak voltage has to be a least 2.0V. > > > > I've experimented with a cap in series with the PIC output, and a resistor to > > ground. This generates a nice positive and negative spike with clean zero > > crossings but this is not good enough. The device I am sending the signal to > > is also looking at the slew rate of the signal. I need a relatively genuine > > sine wave. > > > > Thanks in advance if you have an ideas. > > Instead of filtering a single pulse, you'd be better off filtering a pulse > stream. All you need to do is generate a series of pulses whose widths are > proportional to the sine wave amplitude. Low-pass filter this stream, and you're > done. Since you're using the 'F877, you can use the on chip PWM peripheral to > generate the pulse for you. To obtain the sinusoidal proportional widths, you > can try this: > > http://www.dattalo.com/technical/software/pic/picsine.html > > Scott > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body