AnsweredAssumed Answered

How to convert the value to Temperature and Humidity for HTS221?

Question asked by wun.martin on Aug 29, 2014
Latest reply on Sep 22, 2015 by patel.jayesh.001
I have using HTS221 , and I have get the value from HTS221 via I2C.

The value is like the following:

Read HTS221 CTRL_REG1: 0x20 value is 0x81
Read HTS221 CTRL_REG2: 0x21 value is 0x0
Read HTS221 CTRL_REG3: 0x22 value is 0x0
Read HTS221 STATUS_REG: 0x27 value is 0x0
Read HTS221 HUMIDITY_OUT_L: 0x28 value is 0xAA
Read HTS221 HUMIDITY_OUT_H: 0x29 value is 0x10
Read HTS221 TEMP_OUT_L: 0x2a value is 0xB5
Read HTS221 TEMP_OUT_H: 0x2b value is 0x0

Read HTS221 T0_degC_x8: 0x32 value is 0xBF
Read HTS221 T0_degC_x8: 0x33 value is 0xBF
Read HTS221 T1/T0 msb: 0x35 value is 0x4

Read HTS221 T0_OUT-3C: 0x3C value is 0x0
Read HTS221 T0_OUT-3D: 0x3D value is 0x0
Read HTS221 T1_OUT-3E: 0x3E value is 0x0
Read HTS221 T1_OUT-3F: 0x3F value is 0x0


It seems the data of the temperature and the Humidity is like the following:

Read HTS221 HUMIDITY_OUT_L: 0x28 value is 0xAA
Read HTS221 HUMIDITY_OUT_H: 0x29 value is 0x10
Read HTS221 TEMP_OUT_L: 0x2a value is 0xB5
Read HTS221 TEMP_OUT_H: 0x2b value is 0x0

And it give some example in data sheet like the following:

Step 1: Temperature conversion from ADC_OUT (LSB) to °C
Step 1: Linear interpolation (example)
Table 20. Step 1: Linear interpolation to convert LSB to °C
Conclusion: current temperature is 15 °C.
Input Temperature LSB (ADC)      Output Temperature (DegC)
     T0_OUT = 300                (T0 msb U T0_degC_x8) = 80°C => 80/8 = 10.0 °C
     T_OUT = 400                     T_degC_x8 =120 [interp.] =>T_degC=120/8 = 15.0 °C
     T1_OUT = 500                (T0 msb U T0_degC_x8) = 160°C => 160/8 = 20.0 °C

But I still inderstand how to covert the above data of the temperature and the Humidity to actual temperature and Humidity ?

Does someone can teach me ?

Thank in advance.

Outcomes