pic microcontroller discussion list <> wrote: > I need to generate a 1300Hz ish sine wave pulse, from a pic, that I > can plug into a tape recorder's line in jack to log. > > Obviously, it's fairly easy to get a 1300 Hz square wave, but what > can I do to simply and easily smooth this out a bit, so it's > reasonably close to a sine wave? Your spec isn't very precise(!), but the first option I would suggest is driving the signal from two pins, so you get a '3-state' square wave, sometimes called 'modified sine' by enthusiastic sellers of AC inverters... It's much closer to a sine than a pulse train is (you can test it by doing an FFT (e.g. in MS Excel) and comparing the size of the harmonics. Even better, use PWM and generate a sine from a lookup table. With either solution, add some form of filter (RC or active, depending on the smoothness required) to the output. Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk This e-mail and any files transmitted with it ("E-mail") is intended solely for the addressee(s) and may contain confidential and/or legally privileged information. If you are not the addressee(s), any disclosure, reproduction, copying, distribution or other use of the E-mail is prohibited. If you have received this E-mail in error, please delete it and notify the sender immediately via our switchboard or return e-mail. Neither the company nor any individual sending this E-mail accepts any liability in respect of the content (including errors and omissions) and timeliness of the E-mail which arise as a result of transmission. If verification is required, please request a hard copy version -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics