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.

DAC8574: I2c address problem

Part Number: DAC8574

Two DAC8574 are connected over i2c bus and controlled through ARM SBC. They show 0x48and 0x4c addresses by i2cdetect in linux. I have used 0011 and 0000 for them for (A3A2A1A0 )respectively for addressing. But while writing to DAC from the controller, both addresses write to the same DAC. Kindly help me how to write to both of them. Also which one is 0x48 and 0x4c out of 0011 and 0000 please let me know.

  • Hi,

    What's the status on A0 and A1 bit? I understand that A1 A0 pin is  00 for first device and A1 A0 pin is 11 for second device. While communicating to device, A0 and A1 bit also needs to be set according the pin positions.

    In order for a particular device to respond to a command, the states of the first two bits of the control word C7 and C6 must match the states of A3 and A2 pins.

    for your configuration please have look at Dev 1& 3

  • Hi

    Thanks for your reply. I find the devices by i2cdetct as 0x48 and 0x4c.  While writing to them I am sending address 0x48, then 0x00, 0x12, 0x14 and 0x16 for individual channels followed by data . For the other device, 0x4c, then 0x00, 0x12, 0x14, 0x16 for individual channels followed by data. Am I doing  anything wrong ?

  • Sorry , the write sequence is as follows:  0x48 followed by 0x10,data,0x12,data, 0x14, data, 0x16, data.  For other device, only address is 0x4c, rest are same.

  • Hi Chatterjee,

    For writing into DAC please follow the below procedure. I am assuming your A2 and A3 pins are connected to GND (ie, A3A2 =00)

    1. First send valid I2C address along with write or read, in this you need to write, so that will be 10011A1A0W = 10011000 = 0x98 (address 4C with write bit as 0)

    2. Device acknowledges and you need to send Control Byte (0x18) for Channel A ( I am assuming don't care bits as 1)

    3. Device Ack

    4. Send 16bit data 

    Repeat these for other channels (0x1A, 0x1C, 1E)

    For the next device your address only will change 1001111W (0x4F) with write bit as 0, so this will be 0x9E

    Rest all remains the same.

    Regards,

    AK

  • Hi Akhilesh

    Thanks for your reply.  My i2cdetect program detects 2 DAC as 0x48 and 0x4c.

    The attached screenshot shows that..

    0x50-0x53 are  internal EPROMs.

    I tried to send 0x4f  address, which shows No such device found. (attached snapshot).

    Also as you have mentioned in the earlier post, I tried with 0x9E (though i2cdetect does not probe beyond 0x77), It shows error, (couldn't find device on address !).

    The oscilloscope probe shows sending 2 addresses from master (which is an ARM board in this case, ) 0x48 and 0x 4c.

    Please suggest.

  • Hi,

    Your frame is 8bit addressing right? Please check the same. As per the datasheet and your connections, address should be 0x4F 

    So first write should be 0x9E.

    For a debug, after selecting this device with 0x48 as address, are you able to communicate with the device?

    Regards,

    AK

  • How should I know that 0x48 is communicating? As i2cdetect finds it, I assume it is present. What else can be sent to the IC to ensure it is there?

  • Hi Mou,

    You should note that all DAC8574s will ACK to the 0x48 because that is the BROADCAST address.  Broadcast mode is a specific function built into some DACs that allows you to update all DACs at the same time.  This good for shutdown events.

    What is possibly happening in your system is that only one device is correctly powered on or configured, the 0x4C device.  

    Can you try the following:

    1. Use the broadcast address to update one DAC channel. Do both devices update? Or just one? If only the 0x4C updates (you see a new voltage on the DAC output), then I suspect the 0x4F device is not powered or has a soldering flaw or something.  If both respond, then you probably have an addressing issue. 

    2. If you address device 0x4C, does it update correctly?

    Can you share the DAC portion of your schematic?

    Thanks,

    Paul

  • Hi Paul,

    Thanks for the suggestions. I shall check and let you know.

    Meanwhile You can have a look at the schematic of the DAC part. DAC part.pdf

  • Hi Mou,

    Could this be a grounding issue? I see that you have this J6 connector that is only connected to a net name called "GND", but I do not see where that is connected to the ground symbol.  I have seen this be a problem in certain schematic capture programs.  You should look at your layout and confirm that the gnd nets are actually connected.

    You also have two sets of pull up resistors for the I2C lines.  These are in parallel so you have 900Ω pullups, which is quite small.  Are you I2C lines able to drive that load?

    Thanks,

    Paul

  • Hi Paul

    Thanks for the suggestion. I have checked the Gnd connections. It is well connected to Gnd terminal.

    I have checked the voltage at the A0A1A2A3 pins for the 0x4f address. Voltage is 5v at A0A1, and 0v at A2A3.

    Logically it should show 0x4f but not detecting it.

    In one of my test card I had connected one single DAC with A0A1 to 5V and A2A3 to Gnd. It was also being detected as 0x48 and is communicating well. I am able to write to it's individual channel.

    But in this case, when two are present, 0x48 and 0x4c, I am not able to write to 0x48. Only to 0x4c.

    What else may be wrong?

    Kindly suggest.

  • So in regard to the first question:  Use the broadcast address to update one DAC channel. Do both devices update? Or just one? If only the 0x4C updates (you see a new voltage on the DAC output), then I suspect the 0x4F device is not powered or has a soldering flaw or something.  If both respond, then you probably have an addressing issue. 

    When you have both devices connected to PCB, neither DAC will update when you provide a correctly formatted DAC channel update command to the broadcast address?

    Can you try communicating to the board when only the 0x4F address device is soldered to the board?  To clarify, I would like you to actually write to a channel and confirm that the DAC updates the output.  

  • HI Paul

    Thanks for your support. Finally the problem is resolved. 

    I had connected a single DAC to a new board with 0x4f address configuration and found functioning properly with address detection.  There also 2 addresses were detected, 0x48 and ox4f with i2cdetect.

    Hence changed the IC in my previous board with existing connection and taking special care to the soldering, Now 2 DACs are detected with 0x4c and 0x4f addressees along with 0x48. But I am able to write to both 0x4f and 0x4c now.

    It seems that it  was a soldering issue and the 0x4f address was not getting proper connection. Was not  able to check with multi meter . Finally photograph revealed that.

    But showing the 0x48 address is really a confusing one.

    Thanks once again.

  • Hi Mou,

    I mentioned in a previous post: You should note that all DAC8574s will ACK to the 0x48 because that is the BROADCAST address.  Broadcast mode is a specific function built into some DACs that allows you to update all DACs at the same time.  This good for shutdown events.

    Address 0x48 will be discoverable in any system with the DAC8574.

    Thanks,

    Paul