If I have an I2C Master with multiple I2C Slaves all on separate 3V3 lines (i.e. 3v3_Master, 3V3_Slave1, 3V3_Slave2... etc.) does it matter which 3V3 line the pull-up resistors on the line connect to?
I've looked through the I2C Manual here but couldn't find the answer.
Answer
No it doesn't matter. It will work as long as the micro and pullups both have power. It makes no difference where the voltage comes from - both sides will see 3.3V when no device is pulling down the lines.
With multiple rails, the order that your power rails come up at power-on can sometimes be troublesome. But the good news is that according to the I2C specification, I2C devices and masters are required to use true open-drain outputs, so they won't be damaged or affect communications when they have no power. For example, there are 3 possible states of the micro+pull-up power rails at any given moment for your circuit:
- Micro has power, pullups do not: Obviously this means your micro will not be able to communicate with any slaves.
- Micro does not have power, pullups do: Your micro should not only NOT be damaged by this state, but it should also NOT pull down on the lines, so potentially another master could communicate on the bus.
- Micro and pullups both have power: obviously this means the micro can communicate with any slave that has power, but the I2C spec states that non-powered I2C slaves should not affect the bus.
(All of this assumes I2C compliance, which is not always complete, so as always, testing will tell you for sure.)
No comments:
Post a Comment