You just found the perfect I2C sensor, and you want to wire up two, three, or more of them to your Arduino. When you realize “Oh no, this chip has a fixed I2C address, and from what I know about I2C; you cannot have two devices with the same address on the same SDA/SCL pins”. Are you out of luck? You would be if you don’t have this cool CJMCU TCA9548A I2C 8 Channel Multiple extensions development board.
The CJMCU TCA9548A I2C 8 Channel Multiple extensions development board is interesting in that it has an I2C address (0x70 by default) – and you basically send it a command to tell it which I2C multiplexed output you want to talk to, then you can address the board you want to address.
Robu.in have a different kind of breakout boards; for more boards Click here.
Program :
We suggest using this little helper to help you select the port
#define TCAADDR 0x70
void tcaselect(uint8_t i) {
if (i > 7) return;
Wire.beginTransmission(TCAADDR);
Wire.write(1 << i);
Wire.endTransmission();
}
You can then call tcaselect(0) thru tcaselect(7) to set up the multiplexer.
Note that you if you happen to have I2C devices with I2C address 0x70, you will need to short one of the Addr pins on the TCA9548 breakout to Vin in order to make it not conflict. Given that you can have 0x70 thru 0x77, just find one that’s free and you’re good to go.
1 x CJMCU TCA9548A I2C 8 Channel Multiple extensions development board.
2 x Header set ( Without Soldered).
Use this text to share the information which you like!.
Recently viewed!