Post Go back to editing

I2C Read operation on AD5675R

Thread Summary

The user encountered issues reading back DAC values from the AD5675R using I2C. The solution involved modifying the write portion of the I2C transaction to include a repeated start condition, followed by the read command (0x90 to 0x97). The AD5675R only allows reading from input registers, not from the Power Down/Up Register, LDAC Register, or reference and gain setup register.
AI Generated Content

Hello,

we use the AD5675R in some of our current projects and I'm trying to read back the current DAC values which were previously written. Writing the values is not a problem, I can measure the output signal according to the settings I'm sending to the DAC.

The problem starts when I try to read the DAC. The datasheet of the AD5675R says I'm suppose to address the device via its slave address followed by the command byte. Both are acknowledged by the slave, which is expected.

After that I address the slave again but this time with the R/W bit enabled. And her comes the problem, the slave will not acknowledge it's address this time.

I've already checked the timings and frequency of the SCL and SDA signals, but I could not find anything that would explain the problem.

Before I go further into the problem. I want to ask if anybody had a similar issue? I haven't found anything related to the  AD5675R with the search. Could it be that the data sheet is incorrect and the read procedure is different. Could it be worse and the AD5675R is actually not readable at all.

Any help would be greatly appreciated.

Chris

  • Hi Chris,

    After the I2C write that sets the address to read back from, do you issue a stop condition or a repeated start condition before sending the i2c address followed by R/W/ = 1 for a read?  This is so that the address write and read are part of the same I2C transaction?


    Regards,

    Michael.

  • Hi Michael,

    yes, I'm issuing a repeated start condition. I double checked with a logic analyser, to make sure everything is in order.

    I don't have the logic analyser screenshot by hand, but I could do the plot again later on.

    Chris

  • Hello,

    I've been very busy the last days, so I wasn't able to take the screen shot again until now.

    The screen shot shows exactly what I've described in the first post. The AD5675R is addressed in write mode and a command byte (0x01) is send. After that, a repeated start is issued and the AD5675R is once again addressed, this time in read mode. The read is not acknowledged by the DAC.

    I'm puzzled, because I think I'm not doing anything wrong. But may be I'm overlooking something obvious.

    Once again, any help would be appreciated.

    Chris

  • Hi Chris

    Thanks for sending in the plot.  Can you try modifying the write portion of your I2C transaction to take the following form:.

    <Start><0x0C><Write><ACK><0x90><ACK><0x00><ACK><0x00><ACK><Repeated Start>.. read portion as before

    This  should let you read back the value written to the register for DAC ch 0.  Changing the lower nibble after the 0x9 value should let you read back from a different channel.

    Let me know how this works for you.

    Regards,

    Michael.

  • Hi Michael,

    thanks for writing back. Your suggestion for the read back works perfectly. With 0x90 to 0x97 I can read the previously written DAC values back. So as previously suspected, the data sheet seems to be incorrect about the read back.

    But I have one last Question is it possible to read back the values of the Registers 0x40 (Power Down/Up Register), 0x50 (LDAC register) and 0x70 (reference and gain setup register). Currently this would not be essential for our project, but who knows when I or somebody else wants to do it.

    Thanks again for the help. Much appreciated.

    Regards, Chris

  • Hi Chris,

    Unfortunately it's only possible to read back from the input registers on this family of DACs.

    Regards,

    Michael.

More Content

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.