Tone generation using DAC

Hi, I am looking for some info to generate tone using DAC TLV5626. I am planning to send f1, d1, f2, d2, ...(f = freq, d=duration).

Could somebody point me some resources? Thanks SP

Reply to
SP
Loading thread data ...

You can't send the data to the DAC in that format. The TLV5626 is a straightforward dual channel (Stereo) DAC not a function generator. I think it needs 8 bits of data per channel at the sample rate of the DAC. You need to write a bunch of code that takes the data in the format you mentioned and turns it into a waveform and then outputs it to the DAC. You might consider using look up tables to generate the waveforms.

Reply to
CWatters

Thanks... I am planning to write code and any info would be useful and helpful. I have used PWM to generate, but this is the first time using an DAC.

Reply to
SP

Are you married to this DAC (in other words, do you have to use it?)

With a DAC, you have to send it the digitized samples of the signal you want to produce, in a continuous fashion.

If you're looking for something more like a part which can be programmed in the manner you described, then you might want to take a look at a DDS chip (direct digital synthesis - see Analog Devices), or even a DSP. Depending on your application, it might be a bit overkill.

The most recent issue of QST Magazine (ARRL publication for hams) has an article on a DDS based function generator, that might be of interest to you...

Reply to
w2aew

If you have used an on chip PWM to produce a sine wave before it should be easy to change to a DAC. The sound data you send to the PWM register isn't that different to what you send to the DAC.

Reply to
CWatters

Thanks for for the info. I have committed to DAC. However, thanks for the info of DDS, quiet useful.

Reply to
SP

Thanks for the info. I have already written code and will do my test soon once the target board is here, will let you know, Thanks again.

Reply to
SP

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.