JAJSTN3 December 2024 TMP113
ADVANCE INFORMATION
The digital output from each temperature measurement is stored in the read-only temperature register. The temperature register of the TMP113 device is configured as a 12-bit, read-only register that stores the output of the most recent conversion. The device output is as shown in Table 7-1.
| Temperature Bit Length | Q Notation | LSB (°C) | Range (+) | Range (-) |
|---|---|---|---|---|
| 12 | 4 | 0.0625 | 127.93475 | -128 |
Two bytes have to be read to obtain data. Byte 1 is the most significant byte (MSB), followed by byte 2, the least significant byte (LSB). The first 12 bits 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. One LSB equals 0.0625°C. Negative numbers are represented in binary two’s complement format. Following power-up or reset, the temperature register has 0°C until the first conversion is complete. The unused bits in the temperature register always read 0.
| TEMPERATURE (°C) | DIGITAL OUTPUT (BINARY) | HEX (four LSBs are not used) |
|---|---|---|
| >127.9375 | 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.0625 | 0000 0000 0001 | 001 |
| 0 | 0000 0000 0000 | 000 |
| -0.0625 | 1111 1111 1111 | FFF |
| –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 two’s complement 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