Other Parts Discussed in Thread: LM36011
Hello,
In my design I am using two TCA9548A connected to the same I2C bus from Arduino uC, and I have 8 LM36011 LED drivers connected to each TCA9548A. And all of the LM36011 LED drivers have same I2C address.
I did set unique i2C address with A2-A0 pins so they have different addresses, for example, one is 0x70 and the other one is 0x71.
Strange things happens when I call the CH1 of 0x70 device with Wire.h library, some channels from 0x71 is also responding, but all of the other channels from 0x70 stays quiet (which is expected).
The codes I was using is attached as below.
- #include "Wire.h"
- extern "C" {
- #include "utility/twi.h"
- }
- #define TCAADDR_A 0x70
- #define TCAADDR_B 0x71
- void tcaselect(uint8_t i) {
- if (i > 7) return;
- Wire.beginTransmission(TCAADDR_A);
- Wire.write(1 << i);
- Wire.endTransmission();
- void tcaselect(uint8_t i) {
- if (i > 7) return;
- Wire.beginTransmission(TCAADDR_B);
- Wire.write(1 << i);
- Wire.endTransmission();
- }
And seems the channels responded from 0x71 devices is quite random, it varies from board to board.
There must be something wrong but I don't quite understand why it happened. Can you please help?