Post Go back to editing

I2C Read - AD5667

For the last couple of days I have been attempting to get the read operation working for the AD5667. I am programming the operations in C using a few bit banging functions for start, stop, write, and read.

I got the write operation working perfectly and I have even tested the ACK from the device with positive results.

When I write, I send an address byte, command byte and then the 16bit DAC value. It works perfect. I can change it on the fly - no problem

But when I perform a read back operation all I get is 000000.

The read operation starts with a write of the address. The LSB of this byte is the R/W bit. So all  I do is set it to 1 otherwise the rest of the bits are the same as the write operation 0,0,0,1,1,A1,A2,R/W where A1, A2 = 0 for Vdd and R/W=1 for read operation. Then after the ACK from the AD5667, I read in 3 bytes, the command, and two data bytes. I have poured over the timing diagrams and believe I'm ok here.

Originally I was wondering what I was going to read since the operation does not specify the contents of which DAC (A or B)  would be returned. So perhaps what I am reading is the last command which was written. Is this true? Or perhaps I need to write a new command using different values for C2,C1,C0 in the command word which would shift the values so that the read operation could access them. Complete speculation on my part. And I doubt it since the data sheet does not mention this at all....

It might be obvious to you all that I'm not all that experienced with DAC's so i appreciate your patience and any helpful comments as well. I could surely post code here if anyone feels like givng me a code review.

Thanks 

  • Hi,

    Can you confirm that you are not writing all zeros to the DAC in which case your readback would make sense.

    Please try to write full-scale.

    Can you also forward the timing diagram for your read and we will analyze it for you.

    Regards,

    Michael (PDA Applications)

  • Hi Michael,

    Analog Devices has informed me that there is a bug of some sort in this part. Too bad the data sheet was not updated to reflect this.

    Apparently the input register can only be read one time. After that it zeros out. Further, only the last write can be read back which means you can not access the contents of DAC B if you just wrote to DAC A.

    In my case I could only read the command byte back. The two data bytes were always read as zero.

    Not exactly what I expected and so I have moved on.

    Thanks so much for your response.

    Rick

  • This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin