Skip to main content
Visitor II
August 7, 2016
Question

IIS2DH Temperature sensor data

  • August 7, 2016
  • 1 reply
  • 615 views
Posted on August 07, 2016 at 13:03

Hello,

1.

according to section 2.11 Temperature sensor :

should i read both OUT_TEMP_L (0Ch) & OUT_TEMP_H (0Dh) ?

the data is stored only in OUT_TEMP_H (0Dh) ?

2.

the data i get using OUT_TEMP_H (0Dh) is too low (10C-13C), where the room temperature should be about 20C, am i reading the data wrong?

Regards

Amir

  
    This topic has been closed for replies.

    1 reply

    ST Employee
    August 8, 2016
    Posted on August 08, 2016 at 10:36

    The temperature sensor can be used to measure temperature variations. It isn't suitable to return absolute temperatures measures. 

    The value represents difference respect to a reference not specified value.

    Do following to correctly work with temperature sensor:

    - enable the bits 6 and 7 in TEMP_CFG_REG(1Fh): enable aux ADC and enable temperature sensor.

    - enable Block Data Update, BDU, feature. CTRL_REG4(0x23) , BDU (bit#7)=1.

    - read both the ADC output 3 registers (because of BDU enabled): OUT_ADC_3_L(0x0C) and OUT_ADC_3_H(0x0D).

    Data representation: 2's complement.

    Useful bits: 8, left aligned, hence useful data in OUT_ADC_3_H.

    Temperature sensor output change vs temperature: 1digit/degrCelsius

    Best regards

    Miroslav