cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple HTS221 sensors

Roger Miralles
Associate

I am trying to use 2 HTS221 in the same board with I2C. I have SDA pin from both sensors wired to the same pin on my PCB. 

When I want to use the first HTS221, I set his CS pin to HIGH and the other HTS221 CS remains LOW. However, when I try to read from any of the sensors, the program locks. The only way I get data from the sensors is when both CS pin are set to HIGH, but I am unable to know from which sensor I am getting the values.

I think the problem could be that when one of the sensors CS is HIGH is using the i2C interface while the other is using the SPI interface and causing the problems.

Thank you.

1 REPLY 1
Peter BENSCH
ST Employee

Correct.

Because the HTS221 only has one address pair 0xBE and 0xBF at which it can be reached, you need either two independent I2C channels or an I2C hub or I2C bus switch.

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.