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.

DAC7760 is not tri-stating SDO when expected

We have a board design with 7 daisy chained 7760s (running in 4-20ma mode but that is not important for this discussion).  We have multiple other SPI devices on same SPI bus with the 7760s.  We seem to have a condition where when we have raised the LATCH pin and then do SPI traffic to a different SPI device, the 7760 takes over the SDO line and corrupts our other SPI device's sending data back to the SPI master.  It's as if the 7760 is stuck in read mode.  We have two different test boards and one exhibits this behavior far less than the other.  My question is: how do we keep the 7760 from entering its read mode and taking over the SDO line when we are not even talking to it.  When we look at the timing diagrams, it looks like once the 7760 is convinced its in read mode, it will take over the SDO line regardless of the state of the LATCH line (i.e., very contrary to how most SPI devices act in that when their CS lines are high, they stay off the bus).  We have looked at the LATCH line when we are not talking to the 7760 and it seems to stay high, as expected and only transitions to low when we start talking to the devices.  Our basic logic in talking to the devices is this:

Read or write command:

LATCH=0

send 21 bytes for write or read

LATCH=1

if read:

LATCH=0

send 21 bytes to read

LATCH = 1

Does this seem like the correct logic (it is what we do for all other SPI devices).  The 7760s seems to correctly respond to commands we give to them (i.e., the control and data registers return correct values when we read them back).  The issues is ALWAYS when we have LATCH high and we are talking to other SPI devices.  As a work-around, we see that if, after a write command, we send 21 zeroes (i.e., NOP commands), this seems to kick the 7760 out of read mode.  Why is it getting in read mode in the first place on a write command?

We are running at 250kHz and the times between LATCH transitions are on the order of many microseconds (all done in user-space code calling kernel space code so there are many hundreds of instructions between each LATCH transition).

Perhaps we have the DACs configured incorrectly.  There seems to be very little documentation on how to configure them for DCEN mode.  For my init code, I am having to write 21 bytes (3x7) seven times to get each device in turn into DCEN mode.  Does this make sense?

We could really use some help in figuring out how to get the 7760 to behave properly in the daisy-chain mode.  

Thanks for your consideration.

  • Howdy Scott and welcome to the e2e forums!

    To verify that all devices are in set for daisy chain is it possible to perform a read-back of the DCEN bit? Can you provide us with a copy of your schematic so we can verify connections -- I can provide my email address if you wish to keep the schematic private. A waveform of the 4 signals during the issue would also be helpful (SCLK, LATCH, DIN, SDO), especially a capture of the work around and its effect on the lines.

    Best Regards,
    Matt
  • HI Matt,

    Thanks for getting back to me.  We have 3 boards built and are currently trying to determine if the problem is with just one of the boards or all 3.  If it's just one, we will look for bad solder traces, etc.  If all 3, we'll try to troubleshoot and get traces of the SPI signals.

    Regarding the read back of the DCEN, etc., we have all that and it seems fine.  We can talk to and set the DAC data registers and the DAC work find in 4-20ma mode.  So, we are  a bit mystified as to why when we talk to another SPI device we end up getting the DACs taking over the SDO line.  Smells like a bad solder trace or something.  We will keep shooting it and get back to you if we get anymore info.

    Scott

  • Matt,

    We found the problem - we have 7 DACs daisy-chained and I was setting all 7 to DCEN!  Ooops.  That's what happens when you let a SW guy touch HW.  Anyway, a one-liner in the datasheet that says "Set all DACs to DCEN except the last" would have saved me 60 hours of suffering.  What made this very hard to debug is that we have many other SPI devices on the same bus and with the DACs not tri-stating SDO, the problems are very hard to track down to who is doing the wrong thing.  All is good now!

    Scott