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.

DAC81416EVM: Controlling the EVM using SPI and the USB2ANY SDK

Part Number: DAC81416EVM

Hello!

I've been trying to control the DAC81416EVM using a C++ script implementing the USB2ANY SDK and communicating through SPI. However, I have run into a couple of issues.

First, I've observed that the C++ generated SPI commands aren't transmitted (as in they don't show up on oscilloscope) unless I open TI's app for the DAC and send a random byte. It does not seem to matter what I send or which register it writes to, and I can even close the app afterwards and the C++ script will then work fine. Is this normal? Do you think there could be something wrong with the way I'm doing initialization in the C++ script? Here's what I have in main:

    char serialno[40];
    std::cout << "\n";
    std::cout << u2aFindControllers();
    std::cout << "\n";
    u2aGetSerialNumber(0, serialno);
    std::cout << std::hex <<serialno;
    U2A_HANDLE handle = u2aOpen(serialno);
    uint8_t power_on[] = { 0x03, 0x0A, 0x0C };
    u2aSPI_WriteAndRead(handle, 3, power_on); //Power-on Device, Disable Soft-toggle
    //followed by other SPI_WriteAndRead commands to initialize the other registers in the DAC

Secondly, is it possible to write multiple registers in one SPI command? There's USB2ANY documentation for writing multiple registers in I2C, but I haven't seen anything for burst transmission in SPI. I'm trying to update output voltages for all 16 DACs as quickly as possible, hence the attempt at consolidating them into one command.

Thank you!

  • Hi Grace,

    I think you are right. This sounds like the GUI is doing some initialization with the USB2ANY that your code is not. I am not familiar with using this SDK so I will have to check if there is any one on my team that can help here, but we typically can't provide support with example code beyond the GUIs we provide. 

    To your second question, it is not possible to write to multiple registers in one SPI command. I2C has the ability to send a repeated start command which I assume is what you are referring to. For this device specifically, the write cycle ends when the CS pin is asserted high. If the cycle is longer than 24 bits (or 32 bits if error checking is enabled) then only the first 24 (or 32) bits are used. 

    The CS has to be pulled high for at least the time given in the timing requirements table (CS high time) before the next write can happen.

    Best,

    Katlynne Jones 

  • Hi Grace,

    I double checked with my team and we are not able to support using the USB2ANY outside of our provided GUIs. 

    Best,

    Katlynne Jones