Hi
I want an IC part that can be used to interface around 4-6 slaves with single master I2C communication, in order to get the slave address.
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
I want an IC part that can be used to interface around 4-6 slaves with single master I2C communication, in order to get the slave address.
Thanks
Hey Namitha,
Have you looked at our TCA9548A yet? This is an 8 channel I2C switch which should work for the application you have. I assume you would enable one channel at a time and then send all possible I2C addresses to see which ones would ACK, this would tell you the slave addresses of the devices downstream from the switch. (You would then enable the next channel and disable the previous channel and redo this).
-Bobby
Hi Bobby,
Thanks for your suggestion, but i just want to know how to provide the option to select the slave address in hardware using A0, A1 and A2 pins. It means at a time in PCB we can give provision for only one slave address but how to use that for all the 8 channels at a time so that we can enable to which slave we want to send the data. Any think wrt software side I dont know much how they control using software.
Thanks
Hey Namitha,
A0, A1, and A2 are part of the configurable addresses of the TCA9548A. You would set these pins to GND or Vcc depending on what address you want to make the TCA9548A. To select one of the downstream slaves (which I believe what you are trying to do if I understand correctly), you would need to talk to the TCA9548A through software to enable one channel at a time.
If you are unsure how much control your customer may have on software, maybe using a 2 to X MUX with select lines may be simpler (assuming the customer would prefer to control the select lines through something like a 2 male header on a PCB with some physical shunts). If this is the preferred solution, then let me know so I can reassign this post to a one of our experts in the MUX group to suggest a 2 to 4/6 MUX instead.
Thanks,
-Bobby
Hello Bobby,
What you have understood is correct wrt my problem, can I get any input on how to monitor the slave selection in software...also if possible suggest the part of suitable multiplexer for chip select pin to use SPI protocol instead of I2C, this option I can try but what you have suggested in the 2nd half is not possible in my condition.
Thanks,
"can I get any input on how to monitor the slave selection in software"
The master would need to know the slave address of our I2C switch. For our TCA9548A, this would be provided in table 1 of the datasheet (the address depends on how you reference the A0-A2 pins in hardware/schematic).
The master would then enable channels of the TCA9548A by writing to the device. (send address of TCA9548A with the write bit set then send data packet of which channel to enable) The byte after the address would enable/disable channels depending on table 2 of the datasheet. You could also check to see which channels are enabled by reading from the TCA9548A (it only has one register so a read command is straight forward).
Anything downstream from this if you do not know the slave address then the master would need to scan for all I2C addresses to look for ACKs then check to see if the device has a ID register (some I2C devices do not).
"also if possible suggest the part of suitable multiplexer for chip select pin to use SPI protocol instead of I2C"
As far as I know, we do not have a SPI controlled switch/MUX in our portfolio currently.
-Bobby
Thanks for your clarification Bobby, this has cleared most of my problem. One last query wrt TCA9548A is as they mentioned in datasheet this can also provides voltage level shifter option so can I use the controller I2C section at 3V3 and slave section at 5V with VCC of TCA9548A operating at 5V or I need to use any level shifters in between.
Thanks
"so can I use the controller I2C section at 3V3 and slave section at 5V with VCC of TCA9548A operating at 5V or I need to use any level shifters in between."
This device can support level translation, the easiest way to do this is to simply set the Vcc of the TCA9548A to be the lowest Vcc of the rails you are trying to support. So if you have a 2.5V I2C rail, 5V I2C rail, and 3.3V I2C rail then use 2.5V as the Vcc for the TCA9548A.
Feel free to also create another thread for a schematic check once you get closer to finalizing the design. If the schematic is confidential, you can reach out to me at duynguyen@ti.com to have an offline schematic review.
Thanks,
-Bobby