This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DAC1282: Problem understanding DAC1282 DC Mode

Part Number: DAC1282

Tool/software:

Hello,

I am currently writing a library for the DAC1282, so far I can read and write into registers successfully. What I write is what I read. Now I am trying to make the DAC work on DC mode but there are some part of the datasheet I have a hard time to understan. Can anyone explain the Table 5 on section 8.2.2.2 of the datasheet ?

Also, I fail to understand how the first 3 bits ( DCG0, DCG1, DCG2 ) of the DGC[0] register works. Should they be considered as the digital gain values ? If so, what are the expected values and what does they mean ? Does it mean the DAC is only a 21 bits dac ?

Maybe it would help me if some of you could provide an equation to set the DCG value depending on the voltage I need ( the one on Table 5 isn't helpful ) or better, an official library or implementation from TI.

Thanks for your help.

EDIT: Here is the datasheet I am talking about www.ti.com/.../dac1282.pdf

  • Hello Halidi,

    The DCG registers are just the 24b DAC word to set the output voltage.  Since the DAC1282 output is differential, the value that you store in the DCGx register will be a signed, 24b integer.

    With Vref=2.5V, and Gain=1, the full scale differential output voltage of the DAC1282 will be +FS=+2.5V and -FS=-2.5V.

    Vout=2.5*DCG/2^23 where DCG is the 24b signed integer represented by DCG2:DCG1:DCG0 registers.

    DCG = 2^23*Vout/2.5

    If Vout=0.9, then DCG=3019899d, or 0x2E147Bh, DCG2=0x2Eh, DCG1=0x14h, DCG0=0x7Bh

    If Vout=-0.9V, then DCG=-3019899d, or 0xD1EB85h, DCG2=0xD1h, DCG1=0xEBh, DCG0=0xD1h

    If Vout=0V, then DCG=0, or 0x000000h, DCG2=0x00h, DCG1=0x00h, DCG0=0x00h.

    Regards,
    Keith Nicholas
    Precision ADC Applications

  • Hello Keith,

    Thank you for your answer, that's what I thought at first but I think I must have misread "The DCG0, DCG1, and DCG2 register bytes set the digital gain in dc mode; see Table 5." this sentence confusing bytes to bits hence the confusion. Thank you for clearing that up.

    As for the your calculation, I get +- 3019898 for the same voltage and full scale range. Maybe you forgot to substract 1 to your maximum value for a 24 bits. I get 8 388 607 instead of 8 388 608.

    Thanks again,

  • Hello Halidi,

    Yes, I was rounding and ignoring the 'subtract 1'.  At 24b level, due to noise, this mathematical approximation does not make a measurable difference.

    Regards,
    Keith