JAJSGR1E October 2014 – September 2021 TMP102-Q1
PRODUCTION DATA
The digital output from each temperature measurement is stored in the read-only temperature register. The temperature register of the TMP102-Q1 device is configured as a 12-bit, read-only register (configuration register EM bit = 0, see the Section 7.4.2 section), or as a 13-bit, read-only register (configuration register EM bit = 1) that stores the output of the most recent conversion. Two bytes must be read to obtain data and are listed in Table 7-8 and Table 7-9. Byte 1 is the most significant byte (MSB), followed by byte 2, the least significant byte (LSB). The first 12 bits (13 bits in extended mode) are used to indicate temperature. The least significant byte does not have to be read if that information is not needed. The data format for temperature is summarized in Table 7-2 and Table 7-3. One LSB equals 0.0625°C. Negative numbers are represented in binary twos-complement format. Following power-up or reset, the temperature register reads 0°C until the first conversion is complete. Bit D0 of byte 2 indicates normal mode (EM bit = 0) or extended mode (EM bit = 1) , and can be used to distinguish between the two temperature register data formats. The unused bits in the temperature register always read 0.
TEMPERATURE (°C) | DIGITAL OUTPUT (BINARY) | HEX |
---|---|---|
128 | 0111 1111 1111 | 7FF |
127.9375 | 0111 1111 1111 | 7FF |
100 | 0110 0100 0000 | 640 |
80 | 0101 0000 0000 | 500 |
75 | 0100 1011 0000 | 4B0 |
50 | 0011 0010 0000 | 320 |
25 | 0001 1001 0000 | 190 |
0.25 | 0000 0000 0100 | 004 |
0 | 0000 0000 0000 | 000 |
–0.25 | 1111 1111 1100 | FFC |
–25 | 1110 0111 0000 | E70 |
–55 | 1100 1001 0000 | C90 |
Table 7-2 does not list all temperatures. Use the following rules to obtain the digital data format for a given temperature or the temperature for a given digital data format.
To convert positive temperatures to a digital data format:
Example: (50°C) / (0.0625°C / LSB) = 800 = 320h = 0011 0010 0000
To convert a positive digital data format to temperature:
Example: 0011 0010 0000 = 320h = 800 × (0.0625°C / LSB) = 50°C
To convert negative temperatures to a digital data format:
Example: (|–25°C|) / (0.0625°C / LSB) = 400 = 190h = 0001 1001 0000
Two's complement format: 1110 0110 1111 + 1 = 1110 0111 0000
To convert a negative digital data format to temperature:
Example: 1110 0111 0000 has twos compliment of 0001 1001 0000 = 0001 1000 1111 + 1
Convert to temperature: 0001 1001 0000 = 190h = 400; 400 × (0.0625°C / LSB) = 25°C = (|–25°C|); (|–25°C|) × (–1) = –25°C
TEMPERATURE (°C) | DIGITAL OUTPUT (BINARY) | HEX |
---|---|---|
150 | 0 1001 0110 0000 | 0960 |
128 | 0 1000 0000 0000 | 0800 |
127.9375 | 0 0111 1111 1111 | 07FF |
100 | 0 0110 0100 0000 | 0640 |
80 | 0 0101 0000 0000 | 0500 |
75 | 0 0100 1011 0000 | 04B0 |
50 | 0 0011 0010 0000 | 0320 |
25 | 0 0001 1001 0000 | 0190 |
0.25 | 0 0000 0000 0100 | 0004 |
0 | 0 0000 0000 0000 | 0000 |
–0.25 | 1 1111 1111 1100 | 1FFC |
–25 | 1 1110 0111 0000 | 1E70 |
–55 | 1 1100 1001 0000 | 1C90 |