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.

DAC71416: Software help for basic hardware confirmation

Part Number: DAC71416

Hello!

I have recently assembled a new prototype development board for this IC.

I am experiencing some strange results from the DAC outputs with some preliminary software tests.
Before I pass this design onto my programming team I like to confirm all IO functionality.
I believe I have all configurations correct in the registers for individually targeting DAC channels for value updates.

For example, I can define the range of the DACs and enable/disable with the power down register.
I am not utilising TOGG controls.

What I find when DACs are enabled, their outputs float and fluctuate at random.

My SPI functions are simple. I simply transmit three consecutive bytes. First defining the offset of the target register then the two configuration bytes.
I will past below an excerpt of my process so far:

void setup(){


byte range = 0x11 // set range to 0-10V unipolar positive

// range register
DAC14_SETUP(0x0A, range, range); //DACRANGE0
DAC14_SETUP(0x0B, range, range); //DACRANGE1
DAC14_SETUP(0x0C, range, range); //DACRANGE2
DAC14_SETUP(0x0D, range, range); //DACRANGE3

//Power-up device
DAC14_SETUP(0x03, 0x0A, 0x81);

//Power-up all channels
DAC14_SETUP(0x09, 0x00, 0x00);

//Enable broadcast for all channels
DAC14_SETUP(0x05, 0xFF, 0xFF);

//Write code to all channels
DAC14_SETUP(0x0F, 0xFF, 0xFF);
}


void loop(){

//DAC0 'blink'

//Set DAC0 to max/10V
DAC14_SETUP(0x10, 0xFF, 0xFF);
delay(500); //delay half second

//Set DAC0 to min/0V
DAC14_SETUP(0x10, 0x00, 0x00);
delay(500); //delay half second

}

My DAC14_SETUP function simply transmits out the three arguments within the low CS state.

I expect I am missing something very obvious somewhere!
Any help would be greatly appreciated :)

Kind regards
Jason

  • Hi Jason,

    I think in this case a schematic would be very helpful, can you share it?

    Thanks,

    Paul

  • Hi Paul,

    Sure thing!

    I’ll post one first thing tomorrow :)

    Thanks for the prompt response!

  • Hey Paul,

    Schematic posted below:

    My circuit runs with
    -/+12V rails
    +5V (independent 'analogue' and 'digital')
    +3.3V used by the microcontroller

    I am intending to use the internal reference 2.5V
    I'm not using the TOG pins so they are tied to GND as per the datasheet.

    Look forward to hearing your thoughts.
    Cheers!

    Jason

  • Hi Jason,

    Can you confirm that the REF value is actually 2.5V? I see that you are using polarized cap symbols for C26 and C24, but the polarity would be backward in this case.  Some caps, like aluminum or tantalum type caps, will act as a short if they are biased backward.  

  • Hey Paul,

    REF value checked out as 2.5V on previous testing.

    Caps are all ceramic and non-polarised. My component library is a little messy!

    Good news is everything is functioning perfectly now!
    I stepped back and rewrote my setup routine making the assumption that no configuration register defaults were what I wanted.
    Specifying every bit for my needs and all outputs are addressable and stable now :)

    My hex is a bit rusty, so goodness knows what I had been telling it to do first time round.

    Hardware all checks out now so I'll be passing the prototype onto better coders than myself very soon.
    I can post one more response tomorrow with my code's setup commands, which are now working successfully. On the off chance it's helpful in any way to others in the future.

    Thanks for your quick responses and advice.
    This has been my first experience with the TI support forums. Very happy to have it as a resource.

    All the best!

    Jason