Skip to main content
Visitor II
July 30, 2023
Solved

Multiple STHS34PF80 on I2C bus

  • July 30, 2023
  • 1 reply
  • 1489 views

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.

    This topic has been closed for replies.
    Best answer by TDK

    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.

    1 reply

    TDKAnswer
    Super User
    July 30, 2023

    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.

    KWineAuthor
    Visitor II
    July 31, 2023

    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!

    Graduate II
    July 31, 2023

    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.