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.

DAC60096: Sending data from an Aardvark SPI host adapter

Part Number: DAC60096

Hello,

I am trying to send SPI data from an Aardvark host adapter to the DAC60096. When I use the SDM-USB-DIG to connect from my PC to the DAC, data is sent fine. Additionally, I can see the 16 bit strings necessary to write to the PTR register and select a DAC, and then the 12 bit twos complement voltage setting on the next data cycle. I am working in LabVIEW and I am confused because my code is not outputting a from the DAC. I have all the power inputs correct and SPI pins connected to the Aardvark. My question involves how data should be sent to the DAC.

Right now I have an unsigned 8 bit array of 24 binary values being sent to the DAC at a time. The first write is to the PTR register and to select which DAC to write to. Then the next write is to the BUFA register and that gives the DAC a twelve bit two's complement number. However, my DAC is not changing voltage with this code. I am wondering if there is a different format the data needs to be sent in? Or any other tips/help would be greatly appreciated. I can send you my LabVIEW code as well. Aardvark has a set of VI for writing SPI, I just need to send it the data. My script should write a voltage to the D1_G1 DAC, but it is not.

Thanks for any help/input.

  • Lucas,

    Given the intricacies of and quantity of SPI writing tools it is difficult for us to have proficiency in every one of them. Therefore, it is usually best / easiest if you can provide oscilloscope captures of an example write frame for us to confirm that the SPI digital signals are appropriate for the device to understand.

    For your reference the timing requirements are explained through Section 6.8 along with Figures 1, 2, and 3. The primary take-away being that the setup and hold times for data on SDI is with respect to the rising edge of SCLK. Idle clock polarity can be either high or low.

    The SPI interface always expects 24-bit frames and the bit-wise structure for those frames are explained on page 25.

    Perhaps in discussing your overall sequence you can describe the write sequence in terms of each 24-bit frame.

  • Sorry for the delayed response. I've attached my Oscilloscope data as I couldn't get a screenshot. I've also attached a PDF chart of the excel data, so it is kind of crude but the overall info OScopeData.pdfshould be be shown. The columns represent the SCLK and SDI outputs from my Aardvark host adapter. Please let me know if you need anything else and what the issue is. Thanks!

    OScopeData.xlsx

  • Additonally, when I have my system electrically connected, LDAC is held high. I won't be able to trigger it directly. To change it to logic low do I need to write 4 additional data cycles to the CON register for each subsystem?
  • Lucas,

    The clock phase and polarity seem to be correct for the device here - transitions on SDI appear to happen on falling edges of SCLK so the rising edge appears to be the read edge which is appropriate. There's a fair amount of cross-talk here, I guess the setup may be the Aardvark to the DAC EVM via blue-wires or something, but if possible do take care to ensure the integrity of the ground connection between the two boards. The crosstalk is bad enough to create signals above 4V in some cases, which is pretty bad.

    What is happening to CS during the same time?

    Can you share a log or something of the values that are being sent to the DAC?

    Have you tried any write / read-back sequences to verify that you're communicating with registers?
  • Lucas,

    One option is to tie LDAC low such that updates occur automatically when new data is applied to the buffer registers. This is what the datasheet calls asynchronous operation.

    The other option with LDAC tied high is to use the software LDAC functionality in the CON registers (address 0x4, bit 15) to synchronously update DACs within one of the four subsystems.
  • The crosstalk is, I believe, due to the connection with the oscilloscope cables. I don't think it will be much of an issue with a connection from the Aardvark to the DAC board.

    CS is held high with SDI and they both go low at the start of the write sequence. CS goes high again after writing the three bytes.

    I have not tried any write/read-back sequences, but I will try that. 

    Is connecting LDAC to the common ground via a female to female header or something similar what you are referring to as tying LDAC low? 

    And to specify which subsystem I'd like to tie LDAC low for, would I need to write to the PTR register to select the subsystem (any DAC) and then have another write sequence to the CON register?

  • Lucas,

    Using the EVM board yes you would need to connect LDAC to GND with a jumper cable. If LDAC is tied low, no register interaction is required to issue an update after new data is applied to the DACs. All DACs will update after a corresponding write to their data registers.

    If you choose to implement the SW LDAC functionality you would use the CON register. The CON register applies itself on a subsystem level, so yes you would need to write to the PTR register first to communicate with the subsystem you intend to update. After the write to the PTR register would be an additional write to the CON register for the LDAC bit, on the rising edge of CS for the CON register write the DAC outputs for the selected subsystem will be updated.
  • Okay, I understand what I need to do and I will try to implement some of your suggestions. I will reply again if I need any further help.

    Thanks, Kevin.
  • Lucas,

    For my own tracking and reporting purposes I am going to mark the previous reply as a potential resolution, then. If you reply within 2 weeks the thread will automatically be re-opened. If you need more than 2 weeks the thread will lock but you can come back here and click on "Ask a Related Question" to open a new thread and either myself or someone on my team will continue to support your topic.

    Of course should the suggestions resolve your issue and you have the time to return to the thread for an update - even without further problems - that would be great as well.

    Thanks.
  • That was quick! Thanks for the update.

    Please let us know if there's anything else you need assistance with.