Skip to main content
Visitor II
December 21, 2023
Question

Temperature Conversion - from the LIS3DH sensor raw value

  • December 21, 2023
  • 1 reply
  • 1884 views

Hello All,

Need to read the values from the embedded Temperature Sensor in LIS3DH via I2C communication 

I had made the following configurations as mentioned in the datasheet,

1. CTRL_REG4(0x23) = 0X80

2. TEMP_CFG_REF (1Fh) = 0XC0

3. Trying read the temperature value from the following register OUT_ADC_3_L(0x0C) and OUT_ADC_3_H(0x0D).

     - Getting the value from the OUT_ADC_3_H(0x0D) as 8. If I expose heat near to the chip the value is increasing. 

How to convert this(8) value to temperature?

Kindly assist me to get the conversation formula. Here the Vdd supply = 3.3V.

 

Thanks in Advance.

 

Regards,

Surya S 

  

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    December 21, 2023

    Hi @Surya S ,

    As reported in Table 5 of the datasheet, the temperature sensor output change vs temperature: 1 digit/degree of Celsius.

    Surya SAuthor
    Visitor II
    December 26, 2023

    @Federica Bossi ,

     

    Thank you for the update.

     

    Here the thing is the unit we kept the unit under room temperature 25°C and the value read from the register OUT_ADC_3_H(0x0D) is 7. How can equate this  8 to 25°C? Attached image is for your reference.

     

    SuryaS_0-1703582396726.png

    Thanks In Advance.

     

    Graduate II
    December 26, 2023

    You should be able to read both the low and high byte in a singular 2 byte read operation. What's that number pair?

    Post code section using the ... </> tool in the post edit window, not as a bitmap