Varick St. 150
Unknown NY
New York, Vereinigte Staaten, 10013
[email protected]
https://eckstein-shop.de/Adafruit-Marken
Am Ostbahnhof 3
Niedersachsen
Clausthal-Zellerfeld, Deutschland, 38678
[email protected]
https://eckstein-shop.de
GTIN: | 4060137093944 |
HAN: | 5914 |
Category: | USB/I2C/SPI/UART |
Storage Tiers: | Maintain |
Shipping weight: | 0,01 kg |
Item weight: | 0,00 kg |
Dimensions ( Length × Width × Height ): | 2,52 × 1,77 × 0,58 cm |
The Adafruit LTC4316 I2C Address Translator is another solution, with some magic sprinkled inside. This chip does on the fly address translation. There's an 'input I2C' half, and an 'output I2C' half. And any devices on the 'output' half will automatically have their addresses translated from the input half. Specifically, each device will have bit A6 flipped (most-significant-bit of the address) and then bits A4 and A5 can also be flipped or kept the same, with the two DIP switches on board. To determine the translated address, we use XOR bitwise math.
OK that's a little confusing so let's work through an example. Say we have an AHT20 connected on the output side of this breakout. The AHT20 does not have an adjustable I2C address: it's fixed at 0x38. If both DIP switches are ON, then only A6 is flipped. That means the I2C controller on the input side will see 0x38 XOR 0x40 = 0x78 address. If we flip the A5 switch off, now it will be 0x38 XOR 0x60 = 0x58 and if both switches are off, now bits A4, A5 and A6 will be flipped, so 0x38 XOR 0x70 = 0x48. As far as the AHT20 is concerned, it will happily still see I2C writes and reads on 0x38, but from the I2C controller's perspective, the device is responding on the new address.
If you need more than 4 address translation options (two switches give you 4 options) we also have a spot where you can solder an XOR_LOW resistor for setting the 'bottom' 3 bits by soldering in a resistor value according to the datasheet. It can get confusing quickly so we definitely recommend using an I2C scanner to debug. Note also that you have to reset the LTC if you change the translation address with resistors or the DIP switches: the translation value is picked up on chip boot and isn't on-the-fly adjustable without a toggle of the Enable pin.
While this chip is magical, there's a few things to watch for: it doesn't seem to support clock-stretching so not for funky chips like BNO055. Just because you can change the address on the fly, doesn't mean the drive supports it! Some firmware is expecting a specific address and it may not be trivial to change the address. Check the driver to make sure you know how to change the address, to the new value.
To get you going fast, we spun up a custom-made PCB in the STEMMA QT form factor, making it easy to interface. The STEMMA QT connectors on either side are compatible with the SparkFun Qwiic I2C connectors. This allows you to make solderless connections between your development board and the LTC4316 or to chain it with a wide range of other sensors and accessories using a compatible cable. QT Cable is not included.
Technical Details
- Product Dimensions: 25.2mm x 17.7mm x 5.8mm / 1.0" x 0.7" x 0.2"
- Product Weight: 1.9g / 0.1oz
Manufacturer according to GPSR
Adafruit Industries LLC, Varick St. 150, 10013 New York, Unknown NY, Vereinigte Staaten, [email protected], https://eckstein-shop.de/Adafruit-Marken
Responsible person according to GPSR
Eckstein GmbH, Am Ostbahnhof 3, 38678 Clausthal-Zellerfeld, Niedersachsen, Deutschland, [email protected], https://eckstein-shop.de