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.

DAC81408EVM: DAC81408EVM

Part Number: DAC81408EVM

I have problem writing to the configuration registers on DAC81408. I can read the registers but cannot write to it.

For example, when I send the command 0x83000000 through the SPI interface, I can read the (SPICONFIG register)

data back as 0xXX0AA4XX. When I send the command 0x030A84000, I expect to to write "0A84" to the

register but it doesn't. The data I read back is still "0AA4". Is there any thing I should do to enable writing

to the registers?

Lap

  • Hi Lap,

    Welcome to the E2E forums!

    I assume you are using your own SPI controller (rather than the USB2ANY), can you share a screenshot of the SPI transaction? Usually issues like this are due to a misformatted SPI frame.  Please confirm that your clock edges are correct.

    In addition, you should note that this is a 24bit SPI packet, unless you have CRC enabled.

    Thanks,

    Paul

  • Hi Paul,

    I am using the TI C2000 Delfino MCU F28379D LaunchPad™ development kit to generate the SPI signal. I can successfully

    control the DAC80508EVM. However, once I changed to the DAC81408EVM, I cannot write to the configuration registers.

    The following pictures depicts the two commands I sent through the SPI:

     

    SpiaRegs.SPITXBUF = 0x8300;                         // read operation to SPICONFIG register (first access cycle)

    SpiaRegs.SPITXBUF = 0x0000;                         // second half of the 32-bit data

    while (SpiaRegs.SPIFFRX.bit.RXFFST != 2) {}  // two words has received -> done

    *rr = SpiaRegs.SPIRXBUF;                                // removal of the 1st received words

    *(rr+1) = SpiaRegs.SPIRXBUF;                         // removal of the 2nd received words

    SpiaRegs.SPITXBUF = 0x8300;                       // read operation to SPICONFIG register (second access cycle)

    SpiaRegs.SPITXBUF = 0x0000;                       // second half of the 32-bit data

    while (SpiaRegs.SPIFFRX.bit.RXFFST != 2) {} // two words has received -> done

    *rr = SpiaRegs.SPIRXBUF;                               // removal of the 1st received words

    *(rr+1) = SpiaRegs.SPIRXBUF;                        // removal of the 2nd received words

    The data I get back from the read operation (second access cycle) is 0x800AA483. The "0AA4" is the default data for the SPICONFIG register. One of

    the problem is that I am expecting to get 0x830AA4XX instead of 0x800AA4XX (X: don't care). Another question is that I am using the 24-bit SPI access

    but the LaunchPad kit only allows sending 16-bit data (am I right?). Therefore, I send two 16-bit data and the DAC should automatically ignore the last

    8 bits of data.

    Now, If I send the write operation 0x030A8400 to the DAC, the SPICONFIG register is still "0AA4" not "0A84". I am thinking this maybe the 24-bit/32-bit

    access problem. Please help.

    Thank you.

    Lap

  • Hi Lap,

    I suspect this is a 24/32bit access problem.  Can you try only sending 24bits? I am not 100% familiar on how to configure the MSP430 for this, but I suspect you can change the size of the TX buffer.  

    In addition, you could verify the CS line as well. 

    Thanks,
    Paul

  • Hi Paul,

    I have tried to sending only 24-bit data and I can now write to all registers except the DACn registers (address: 0x14 to 0x1B).

    Therefore, I cannot get and analog output from the DAC. Is the addresses of the eight DAC registers right? (0x14 to 0x1B).

    I don't understand why I can't write to these registers.

    Regards,

    Lap

  • Hi Lap,

    How are you configuring the device initially?  My colleague Uttam has a brief step-by-step for initializing the device:

    https://e2e.ti.com/support/data-converters/f/73/t/832194

    For example, if the device is still in power-down mode or the reference is not enabled, you will not see an output.  It is also important to note (even more important as the datasheet is incorrect) that the DAC registers are write-only.  You cannot read the DAC registers back.  This is a typo that we have identified and we are currently updating the datasheet (it can take a few weeks).

  • Hi Paul,

    Yes, I realized that the DAC registers are write only and I need to power up the DAC channels before using them.

    It is working now. Thank you for your help.

    Lap