To convert a 24-bit digital output value to a real temperature value, follow these steps:
- For positive values:
- Shift the 24-bit digital output value to obtain the 19-bit value.
- Convert the 19-bit binary number to decimal.
- Multiply the decimal value by the resolution (0.0078125) to obtain the temperature value.
- For negative values:
- Two possible methods can be used:
- Method 1:
- Shift the 24-bit digital output value to obtain the 19-bit digital output.
- Invert these digits (changing 1's to 0's and vice versa).
- Add one to the LSB to get the decimal value.
- Multiply the decimal number by the resolution to obtain the temperature value.
- Method 2:
- Shift the 24-bit digital output value to obtain the 19-bit digital output.
- Convert the 19-bit binary output to decimal.
- Subtract 219 from the decimal value.
- Multiply the result by the resolution number to get the temperature value.
- Method 1:
- Two possible methods can be used: