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.
Note : PCA9548A on board working remains same.
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.
Note : Product may vary in two variants TCA9548A & PCA9548A
1 x CJMCU TCA9548A I2C 8 Channel Multiple extensions development board.
2 x Header set ( Without Soldered).
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.
Note : PCA9548A on board working remains same.
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.
Note : Product may vary in two variants TCA9548A & PCA9548A
1 x CJMCU TCA9548A I2C 8 Channel Multiple extensions development board.
2 x Header set ( Without Soldered).
Subscribe to get Email Updates!
Thanks for subscribe.
Your response has been recorded.
Tenet Technetronics focuses on “Simplifying Technology for Life” and has been striving to deliver the same from the day of its inception since 2007. Founded by young set of graduates with guidance from ardent professionals and academicians the company focuses on delivering high quality products to its customers at the right cost considering the support and lifelong engagement with customers. “We don’t believe in a sell and forget model “and concentrate and building relationships with customers that accelerates, enhances as well as provides excellence in their next exciting project.