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.

LAUNCHXL-CC3235SF: How can i connect multiple HDC2010 temp and humidity sensors on a single i2c bus

Part Number: LAUNCHXL-CC3235SF
Other Parts Discussed in Thread: HDC2010

Hi Ti, 

I want to ask related question of my previous post, which i posted over Sensor form, In that post asked that how can i connect multiple HDC2010 sensors (of same address)  on a single i2c bus.  here is the link FYI, please have a look.

here is first reply..

  

and secondly said that is possible what is said, confirmed by cc3235 team.

here second reply...

could you let us know what is the meaning of the there is little involved on the firmware side. 

or 

how can i connect multiple(2-8) HDC2010 sensor without using any multiplexer on a single i2c bus?

Thanks in advance 

sarju bhatnagar

  • Hi,

    Two HDC2010 devices you can connect to single I2C bus without any issue. At fist device you set HDC2010 pin ADDR to Vcc and 2nd HDC2010 ADDR pin to GND In this case each device will have unique I2C address.

    But if you need more HDC2010 devices at same bus with same address this is not possible. But nothing prevent you use one of this trick:

    • break I2C bus into multiple segments and use internal pinmux at CC3235 to switching I2C peripheral to different pins on-the-fly
    • connect GPIO pin to ADDR pin of  HDC2010 use this like "chip select"

    Jan

  • Hi Sarju,

    Josh's idea on how to use multiple HDC2010 devices on the same bus involves dynamically muxing the I2C bus pins in your application. This will allow the same bus to be accessed at different pins of the CC3235, while using the same logical I2C peripheral and bus.

    That being said, this will effectively mean that you will need an additional 2 SDA/SCL pins for each HDC2010 that you will be using. There are only 4 sets of possible I2C pin muxing for both SDA and SCL, so that technique will only work for up to 4 HDC2010 sensors.

    You can combine this with having each set of SDA/SCL pins be be connected to two HDC2010 devices, one with ADDR asserted and one with it deasserted.

    To actually perform the pin muxing, you will need to use low-level driverlib code. The function to mux a given pin into a I2C pin is: PinTypeI2C(<pin>,<pin mux config mode>). So for example if you wanted pin1 to be I2C SCL, you can call PinTypeI2C(PIN_01, PIN_MODE_1).

    The full list of possible pinmuxing options is found in table 16-7 of the TRM: http://www.ti.com/lit/swru465

    Now, what you will need to do at runtime is the following:

    1. Startup the I2C bus using TI drivers at runtime.

    2. When a switch is desired, mux the current I2C pins to GPIO,  with the PinTypeGPIO() function.

    3. Mux the new pins to I2C with the PinTypeI2C() function.

    Regards,

    Michael