-2
\$\begingroup\$

I want to generate a sine wave with 20Mhz frequency, using a FPGA (Cyclone 3 EP3C10E) and an external 10bit DAC converter (http://www.analog.com/static/imported-files/data_sheets/AD7533.pdf).

I have a vague idea that DDS or Cordic algorithm will work, but I dont know them very well. Would you plz suggest some sample codes for it?

\$\endgroup\$
1
  • \$\begingroup\$ I'm not sure that DAC has enough bandwidth - it quotes a settling time of 600ns, which is only enough time to give you about 1.5MHz. If you just want a regular sine wave it's easier to do it in analog? \$\endgroup\$
    – pjc50
    Commented Jun 4, 2013 at 12:11

1 Answer 1

3
\$\begingroup\$

You can try to generate a single period the sine wave in matlab first, extract the samples, store them in the RAM (or BRAM) and let the FPGA play it the cyclic way, sending the data to the DAC.

In matlab you should do

sin(2*pi*F*n*T)

Where F is the required sine frequency, T is the period time of the generating clock and n may run from 0 up to the number which give you 2*pi which is full sine period.

n is basically the number of samples you have of the required sine wave using the generator clock.

You may need to refer to nyquist theorem to see you are good.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.