Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

Stratix II ES180 board, help me with DAC output

Hi all,

I am in trouble with ADC module. I try to code a very simple code:

module dac_test(

input clk,

output [13:0] dac

);

assign dac = 14'b11110001010110;

endmodule

with clk is 1Mhz clock and I mapped it into PIN_B15, and the 14bit data dac, I mapped it into 14 pin of U14. I sure that after I install like this, I totally get the logic level in U14's pins as in the code, and I also check the clock at pin 28 of U14. It is OK.

However, I use the VOM try to get the analog output voltage of DAC (DAC), but I always got the same level of DC 0.45V. It's always the same when I try to change the input data. I dont know why...

Pls help me how to check and use this DAC module on this board.

Thank you

14 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    First, if you have a look at the DAC904 datasheet, you will see that the DAC loads the data values on the rising edge of the clock, so it's not a good idea to have a signal pin at the same frequency than your clock. It should be at most half the frequency.

    Second if you have another look at the DAC904 datasheet, you will see that TI made something very stupid: they called "Bit1" the MSB and "Bit14" the LSB. So in fact you need to connect your data vector backwards: dac[0] to Bit14, dac[1] to Bit13, dac[2] to Bit12 etc.... right now you are toggling the least significant bits right now, which are unlikely to change the DAC output enough for you to see it on the scope. Try to toggle Bit1 and Bit2 instead, for example, and see if there are any changes.

    --- Quote End ---

    I used the oscilloscope to check the frequency of LSB bit (pin 14 of DAC). its frequency is 1Mhz. So, it just take 0.0164s for counting from 0 to 16384 ( the output voltage should be from 0 to 5v AC). So, I think I can "observe" the change in the oscilloscope. I input the clock for the DAC of 5Mhz. but the result is almost the same. the output voltage is always 0V before and after the transformer

    I wonder the DAC 904 on this board is broken. So if you have any FPGA stratix board. pls help me> I will send the .sof file and the project file. could you check for me on your board?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear Daixiwen

    I found the problems...I dont know... the problem is...no problem. I did

    simple code... just output 14bit of 0 and 14bit of 1 following the frequency of input clock. the signal output

    in the stratix II board is changed with the frequency of input sequence.

    However, in the Stratix I (I test the code in two kinds of Stratix

    board), I can easily observe the output signal on oscilloscope in the

    same condition. But in the Stratix II board, I cant see any signal like

    in the stratix I board...

    Anyway, I knew what I am wrong. I learned a lot from forum and from you.

    thank you a gain
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Is it the same DAC on both boards and is it cabled correctly?

    I'm glad you could make it work eventually. If you were only toggling the LSBs of the DACæs input it is not surprising that you didn't see anything on the scope. Toggling the MSBs should give more significant results.

    Of course TI's rather odd convention for the bit numbering doesn't help
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yes..the same DAC904, however, in the Stratix II board, the output of DAC is Current, and In the Stratix board, the DAC output is VOLTAGE. the way they drive them.. I think..

    special thank to you, ^^