Electronic Components Datasheet Search |
|
TN1180 Datasheet(PDF) 5 Page - STMicroelectronics |
|
TN1180 Datasheet(HTML) 5 Page - STMicroelectronics |
5 / 9 page TN1180 How to obtain temperature values in C 3 How to obtain temperature values in °C The LPS331AP also contains a temperature sensor which is used for compensation of the pressure sensor. The temperature data is also available for outside applications. The temperature raw count is stored in registers Temp_Out_H (2Ch) and Temp_Out_L (2Bh). The temperature in °C can be determined by calculating the two’s complement, if necessary, and perform the scaling. An example of a temperature calculation when the sign bit is 0 is shown below. Figure 5: Temperature example 1: sign bit is 0, this is a positive value Likewise, a negative value is indicated when the MSB in the temperature word is equal to 1. To obtain the temperature, we first take the two’s complement of the complete word and then perform the scaling and offset operation. An example of a temperature calculation when the sign bit is 1 is shown below. Figure 6: Temperature example 2: sign bit is 1, two's complement As shown in the figure above, a negative value in the raw count register does not always result in a negative a temperature value in degrees Celsius. This is because the offset and scaling factor must be applied to determine the final value in °C units. Temperature Counts = 2Ch & 2Bh = 6BD0h = 27600(dec) 6 B D 0 Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Temp_Out_H (0x2C) 1 1 0 1 0 0 0 0 Temp_Out_L (0x2B) 1 0 1 0 1 1 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 0 1 Temperature in °C = Offset + = 42.5 + = 100 °C scale # counts 480 counts / °C 27600 counts 1110 0000 0111 1100 0001 1111 1000 0011 + 1 ; invert ; add 1 ; need to take the 2's complement 0001 1111 1000 0100 = - 1F84h = - 8068(dec) Temperature in °C = Offset + = 42.5 + = + 25.7 °C scale # counts E 0 7 C Bit 15 Bit 14 Bit 13 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Temp_Out_H (0x2C) 0 1 1 1 1 1 0 0 Temp_Out_L (0x2B) 1 0 0 0 0 0 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 1 1 480 counts / °C - 8068 counts DocID026298 Rev 1 5/9 |
Similar Part No. - TN1180 |
|
Similar Description - TN1180 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |