Results 1 to 5 of 5

Thread: Dac help needed to generate sine waveform from Altera FPGA

  1. #1
    Join Date
    Feb 2012
    Posts
    23
    Rep Power
    1

    Default Dac help needed to generate sine waveform from Altera FPGA

    Hi,
    My application needs to generate a sine wave of 10 to 20 samples per period. I am using Altera Cyclone 3 FPGA. Can anyone suggest which DAC I should be using. Also inputs as to how to go about the process will be useful. I know that a look-up table would have to be built which contains these values. However a detailed process would be very highly appreciated. Also if the most popular DACs that are used with these applications are mentioned, then it will lessen a lot of burden on me.

    Regards
    Ranjan

  2. #2
    Join Date
    Aug 2005
    Location
    California
    Posts
    4,044
    Rep Power
    1

    Default Re: Dac help needed to generate sine waveform from Altera FPGA

    You need to do a little more research on your own first. You have missed several critical requirements, i.e., what is your highest frequency output (that you happen to want 10 or 20 samples at) and what is the dynamic range you require (this determines the number of bits in the DAC).

    You could also work backwards; look at the ADC/DAC boards that Terasic has, and see if they are sufficient.

    Cheers,
    Dave

  3. #3
    Join Date
    Feb 2012
    Posts
    23
    Rep Power
    1

    Default Re: Dac help needed to generate sine waveform from Altera FPGA

    Hello,
    I did a bit of research and I have decided for the initial part to use a lookup table and input the values to the DAC. I dont intend to implement a DDS at the very beginning. The frequency of the sine wave is going to be around 60Mhz and I will be using a 14bit DAC from Terasic (The one which is compatible to Altera Cyclone 3 FPGA starter kit with HSMC connector). I need to know how many samples will be ideal per cycle for a fairly clean sinwave to be seen at the scope . Also to represent the negative part of the sine wave, I must use 2's complement representation. Will the DAC take that into account? I mean if I represent a number in 2's complement form will the DAC understand that or take that as a positive number? Also say I have the magnitude of sine wave at a particular time to be 0.4583. If I multiply it by 1000 and store 4583 as shown in many posts, how will the DAC know that it has to represent 0.4583 and not 4583, or is it the relative values that are taken into account by the DAC? If someone can address these doubts, I would be very thankful.

    Regards,
    Ranjan

  4. #4
    Join Date
    Aug 2005
    Location
    California
    Posts
    4,044
    Rep Power
    1

    Default Re: Dac help needed to generate sine waveform from Altera FPGA

    The frequency of the sine wave is going to be around 60Mhz and I will be using a 14bit DAC from Terasic (The one which is compatible to Altera Cyclone 3 FPGA starter kit with HSMC connector).
    And this DAC has a sample rate of what?

    I need to know how many samples will be ideal per cycle for a fairly clean sinewave to be seen at the scope.
    If your scope has a high bandwidth, then you will never see a 'clean' sinewave, you will see a staircase waveform that follows the sample values that you output. That is all a DAC can do. It is up to you to follow the DAC output with an analog filter to remove the frequencies that you do not want.

    For example, read page 16:

    http://www.ovro.caltech.edu/~dwh/carma_board/ad9956_tests.pdf

    Also to represent the negative part of the sine wave, I must use 2's complement representation. Will the DAC take that into account?
    Read the DAC data sheet. There are several different binary formats. If the DAC does not accept 2's compliment, then worst case you'll just have to add an offset or flip the MSB.

    Cheers,
    Dave

  5. #5
    Join Date
    Feb 2012
    Posts
    23
    Rep Power
    1

    Default Re: Dac help needed to generate sine waveform from Altera FPGA

    Thanks a lot Dave for your useful insight. Right now the terasic site is down and I cannot access the datasheet. I will do so as soon as the site revives and let you know the details.
    Regards,
    Ranjan

Similar Threads

  1. Generate sine wave and triangular with Megafunction
    By eddyp82 in forum IP Discussion
    Replies: 9
    Last Post: June 6th, 2012, 04:32 AM
  2. generate square waveform using DAC in Altera DE0 Kit
    By Ummaruddin in forum Quartus II and EDA Tools Discussion
    Replies: 3
    Last Post: October 10th, 2011, 08:42 AM
  3. NCO:Sine Waveform
    By jasonkee111 in forum DSP Builder and DSP IPs
    Replies: 15
    Last Post: November 15th, 2009, 06:15 PM
  4. NCO:Sine Waveform
    By jasonkee111 in forum General Altera Discussion
    Replies: 2
    Last Post: November 10th, 2009, 12:54 AM
  5. Generate waveform using CORDIC and DDS
    By jasonkee111 in forum General Altera Discussion
    Replies: 0
    Last Post: October 27th, 2009, 01:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •