Running an I2C scan to verify a setup is highly recommended when using an address translator.
But that's not all! There's yet another approach for dealing with multiple same address I2C devices - address translation.
With this approach, instead of using a muxer, a different specialized device (address translator) is used which translates the device's I2C address on the fly. This has the benefit of not needing to worry about changing the muxer's channel, but has some other quirks and limitations. Here we show some usage examples using the LTC4316.
See the main guide for details about the LTC4316:
The LTC4316 does not work well with clock stretching I2C devices.
Example Setup
We'll show code for an Arduino example and a CircuitPython example based on the following hardware setup.
In this setup both BME280's are using the default 0x77
I2C address. The LTC4316 is configured with the A4 and A5 switches ON. This means those bits of the I2C address are not XOR'd. Therefore, only the upper bit of the I2C address is XOR'd. As a result, the BME280 "behind" the LTC4316 will have its address show up as 0x37
.
Text editor powered by tinymce.