SBOS721B October 2014 – October 2024 TMP75B-Q1
PRODUCTION DATA
The 12-bit digital output from each temperature measurement conversion is stored in the read-only temperature register. Two bytes must be read to obtain the data; see Figure 8-2. Note that byte 1 is the most significant byte, followed by byte 2, the least significant byte. The temperature result is left-justified with the 12 most significant bits used to indicate the temperature. There is no need to read the second byte if resolution below 1°C is not required. Table 7-1 summarizes the temperature data format. One LSB equals 0.0625°C. Negative numbers are represented in binary 2's complement format.
TEMPERATURE (°C)(1) | 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-1 does not supply a full list of all temperatures. Use the following rules to obtain the digital data format for a given temperature, and so forth.
To convert positive temperatures to a digital data format:
Divide the temperature by the resolution. Then, convert the result to binary code with a 12-bit, left-justified format, and MSB = 0 to denote a positive sign.
Example: (50°C) / (0.0625°C / LSB) = 800 = 320h = 0011 0010 0000
To convert a positive digital data format to temperature:
Convert the 12-bit, left-justified binary temperature result, with the MSB = 0 to denote a positive sign, to a decimal number. Then, multiply the decimal number by the resolution to obtain the positive temperature.
Example: 0011 0010 0000 = 320h = 800 × (0.0625°C / LSB) = 50°C
To convert negative temperatures to a digital data format:
Divide the absolute value of the temperature by the resolution, and convert the result to binary code with a 12-bit, left-justified format. Then, generate the 2's complement of the result by complementing the binary number and adding one. Denote a negative number with MSB = 1.
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:
Generate the 2's compliment of the 12-bit, left-justified binary number of the temperature result (with MSB = 1, denoting negative temperature result) by complementing the binary number and adding one. This represents the binary number of the absolute value of the temperature. Convert to decimal number and multiply by the resolution to get the absolute temperature, then multiply by –1 for the negative sign.
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