Maker Pro
Maker Pro

Tone generation using DAC

S

SP

Jan 1, 1970
0
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
 
C

CWatters

Jan 1, 1970
0
SP said:
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).

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.
 
S

SP

Jan 1, 1970
0
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.
 
W

w2aew

Jan 1, 1970
0
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...
 
C

CWatters

Jan 1, 1970
0
SP said:
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.

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.
 
S

SP

Jan 1, 1970
0
Thanks for for the info. I have committed to DAC. However, thanks for
the info of DDS, quiet useful.
 
S

SP

Jan 1, 1970
0
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.
 
Top