2023-07-30 04:16 PM
I have an application that requires two STHS34PF80 sensors on the same I2C bus. I tried using N-FETs on the SDA lines to select between them but this doesn't work, not sure why. I will try the 3-wire SPI bus but I am not sure my current MCU API suports this without some development. I would like to know how the chip select works. If the STHS34PF80 is on an I2C bus but the CS pin is held LOW, does it simply ignore any activity on the SDA or SCL lines? In other words, can I use the CS pin on the STHS34PF80 as an I2C chip select, toggling between one or the other to configure or read data via I2C? Thanks in advance for your answer.
Solved! Go to Solution.
2023-07-30 04:53 PM
When CS is held low, it operates in SPI mode and will interpret signals on SDA/SCL as CLK/DAT. So no, that's not what you want.
The I2C slave address can't be changed on this chip, so you want to control multiple chips, you'll need to use them in SPI mode, or on different I2C buses.
2023-07-30 04:53 PM
When CS is held low, it operates in SPI mode and will interpret signals on SDA/SCL as CLK/DAT. So no, that's not what you want.
The I2C slave address can't be changed on this chip, so you want to control multiple chips, you'll need to use them in SPI mode, or on different I2C buses.
2023-07-30 05:06 PM
I was afraid of that. I'll try the 3-wire SPI solution; It is sufficiently different from the usual 4-wire API that we will have to invest some time in software development. I don't have another I2C bus available....Thanks for the reply!
2023-07-30 08:12 PM
I don't have another I2C bus available
If it is necessary to use multiple slave devices with the same address on a single I2C bus, it is possible to use switching devices, such as the IC TCA9548A, which allows an I2C port to operate 8 devices with the same slave address. The TCA9548A IC has its own addresses, which makes it possible to increase 8 more ports for each TCA9548A.