cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple STHS34PF80 on I2C bus

KWine
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

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!


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.