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.

INA219: I2C Address

Part Number: INA219

Dear Team,

I found some description about I2C address from another E2E thread.

But my customer and I still cannot understand how INA219 determines its I2C address.

VCC/SDA/SCL should have the same Vih voltage, but SDA and SCL will be controlled and toggled by the I2C master.

Does it means that the master needs to control the address of INA219? Could the master control the address dynamically?

Please help to explain more details. 

Thank you.

Jim

  • Hi Jim,

    The address of the INA219 is set by the connections at the A0 and A1 pins, according to Table 1 of the datasheet as copied below.

    The state of these pins is sampled before every communication packet to check whether they are connected to GND, VS, SDA, or SCL. You don't need to worry about the voltages on these lines toggling high and low during communication. 

    The master could control the address dynamically if you used GPIO pins to toggle switches that change the connections at A0 and A1. However, this is not recommended due to timing concerns. It is best if the A0 and A1 pins are shorted directly to GND, VS, SDA, or SCL and left fixed.

    If this answered your question, please click the green button "This resolved my issue." Thanks!

    Best regards,

    Ian Williams
    Applications Manager
    Current & Magnetic Sensing

  • Dear Ian,

    Thanks for reply.

    The state of these pins is sampled before every communication packet.

    Before every communication packet, VS,SDA and SCL could have the same voltage maybe like 3.3V.

    How INA219 knows which one it connect to and then generate 4-bit output? 

    Thank you.

    Regards,

    Jim

  • Hi Jim,

    The state of the address pins is not dependent on voltage. The device performs an internal continuity check to see which pins are shorted together, then sets the address based on that.

    Best regards,

    Ian Williams