20 /6 — Operation—Alarm Signaling. BIT 7. BIT 6. BIT 5. BIT 4. BIT 3. BIT 2. BIT …
文件格式/大小
PDF / 496 Kb
文件语言
英语
Operation—Alarm Signaling. BIT 7. BIT 6. BIT 5. BIT 4. BIT 3. BIT 2. BIT 1. BIT 0. LS BYTE. BIT 15. BIT 14. BIT 13. BIT 12. BIT 11. BIT 10. BIT 9. BIT 8
link to page 6 link to page 6 link to page 6 link to page 8 DS18B20 Programmable Resolution 1-Wire Digital Thermometer The DS18B20 output temperature data is calibrated in Operation—Alarm Signaling degrees Celsius; for Fahrenheit applications, a lookup After the DS18B20 performs a temperature conversion, table or conversion routine must be used. The tempera- the temperature value is compared to the user-defined ture data is stored as a 16-bit sign-extended two’s comple- two’s complement alarm trigger values stored in the ment number in the temperature register (see Figure 4). 1-byte T The sign bits (S) indicate if the temperature is positive H and TL registers (see Figure 5). The sign bit (S) indicates if the value is positive or negative: for positive or negative: for positive numbers S = 0 and for negative numbers S = 0 and for negative numbers S = 1. The T numbers S = 1. If the DS18B20 is configured for 12-bit H and T resolution, all bits in the temperature register will contain L registers are nonvolatile (EEPROM) so they will retain data when the device is powered down. T valid data. For 11-bit resolution, bit 0 is undefined. For H and TL can be accessed through bytes 2 and 3 of the scratchpad 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit as explained in the Memory section. resolution bits 2, 1, and 0 are undefined. Table 1 gives examples of digital output data and the corresponding Only bits 11 through 4 of the temperature register are temperature reading for 12-bit resolution conversions. used in the TH and TL comparison since TH and TL are 8-bit registers. If the measured temperature is lower than BIT 7BIT 6BIT 5BIT 4BIT 3BIT 2BIT 1BIT 0LS BYTE 23 22 21 20 2-1 2-2 2-3 2-4 BIT 15BIT 14BIT 13BIT 12BIT 11BIT 10BIT 9BIT 8MS BYTE S S S S S 26 25 24 S = SIGN Figure 4. Temperature Register Format Table 1. Temperature/Data RelationshipTEMPERATURE (°C)DIGITAL OUTPUTDIGITAL OUTPUT(BINARY)(HEX) +125 0000 0111 1101 0000 07D0h +85* 0000 0101 0101 0000 0550h +25.0625 0000 0001 1001 0001 0191h +10.125 0000 0000 1010 0010 00A2h +0.5 0000 0000 0000 1000 0008h 0 0000 0000 0000 0000 0000h -0.5 1111 1111 1111 1000 FFF8h -10.125 1111 1111 0101 1110 FF5Eh -25.0625 1111 1110 0110 1111 FE6Fh -55 1111 1100 1001 0000 FC90h *The power-on reset value of the temperature register is +85°C. BIT 7BIT 6BIT 5BIT 4BIT 3BIT 2BIT 1BIT 0 S 26 25 24 23 22 21 20 Figure 5. TH and TL Register Format www.maximintegrated.com Maxim Integrated │ 6