| 数据搜索系统,热门电子元器件搜索 |
|
TN1180 数据表(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
TN1180 数据表(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 |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |