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.
Specification and Features :
- 1-to-8 Bidirectional Translating Switches.
- Supports Hot Insertion.
- Low Standby Current.
- 1-to-8 Bidirectional Translating Switches.
- Active-Low Reset Input.
- Power Up With All Switch Channels Deselected.
- I2C Bus and SMBus Compatible.
- 5-V Tolerant Inputs.
- Latch-Up Performance Exceeds 100 mA Perย JESD 78, Class II.
Pin Description :ย
Power Pins:
- Vinย โ this is the power pin. Since the sensor chip uses 3-5 VDC. To power, the board, give it the same power as the logic level of your microcontroller โ e.g. for a 5V micro like Arduino, use 5V.
- GNDย โ common ground for power and logic.
I2C Control-Side pins :ย
- SCLย โ this is the I2C clock pin for the chip itself, connect to your microcontrollers I2C clock line.
- SDAย โ this is the I2C data pin for the chip itself, connect to your microcontrollers I2C data line.
- RSTย โ this is the reset pin, for resetting the multiplexer chip. Pulled high by default, connect to ground to reset
- A0ย A1 A2ย โ these are the address selection pinsย for the multiplexer. By default, the multiplexer is at addressย 0x70ย and these three pins are pulled low. Connect them toย Vinย to set the address toย 0x71ย โย 0x77.
- A0ย is the lowest-significant bit (if it is pulled high, it will increase the address by 1).
- A1ย is the 2nd-lowest-significant bit (if it is pulled high, it will increase the address by 2).
- A2ย is the 3rd-lowest-significant bit (if it is pulled high, it will increase the address by 4).
I2C Multiplexed-Side pins:
- SDxย andย SCx:ย There are 8 sets ofย SDxย andย SCxย pins, fromย SD0/SC0ย toย SD7/SC7. These are the multiplexed pins. Each one is a completely separate I2C bus set. So you have 8 I2C devices with identical addresses, as long as they are on one I2C bus each.
- These pins do not have any pullups installed, so if you are using a chip or breakout without I2C pull-ups be sure to add them!ย Nicely, you can haveย Vinย be 3.3V and have these pins pulled up to 5V (that is, they are 5V compliant).
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.
Package Includes :
1 xย CJMCU TCA9548A I2C 8 Channel Multiple extensions development board.
2 x Header set ( Without Soldered).
Reviews
There are no reviews yet.