Keywords: DS1854, DS1857, DS1858, digital pot, digital potentiometer, digipot, potentiometers
Related Parts |

APPLICATION NOTE 228

Abstract: The DS1854, DS1857, and DS1858 monitor V

60h (Temperature MSB) | 61h (Temperature LSB) | ||||||||||||||

S | 2^{6} |
2^{5} |
2^{4} |
2^{3} |
2^{2} |
2^{1} |
2^{0} |
2^{-1} |
2^{-2} |
2^{-3} |
2^{-4} |
2^{-5} |
2^{-6} |
2^{-7} |
2^{-8} |

S | 2^{6} |
2^{5} |
2^{4} |
2^{3} |
2^{2} |
2^{1} |
2^{0} |
2^{-1} |
2^{-2} |
2^{-3} |
2^{-4} |
0 |
0 |
0 |
0 |

The left most bit is the sign bit and indicates whether or not the 2's complement binary number is positive or negative. If this bit is 0, then the temperature is positive. If the bit is 1, then the temperature is negative. The next 11 bits contain the value of the temperature and are translated into decimal differently depending on whether the values are positive or negative.

HEXIDECIMAL DATA | BINARY DATA | MASKED BINARY DATA |

3C50h | 0011 1100 0101 0000 | 0011 1100 0101 0000 |

Since the sign bit is 0, the temperature is positive and requires no 2's complement transformation. Therefore, the value can be translated directly into a decimal number using a calculator. The binary number 0011 1100 0101 0000 is equal to the decimal value of 15440. The decimal value must be divided by 256 (or multiplied by 2-8) to calculate the correct decimal temperature value. Dividing the decimal value 15440 by 256 results in a decimal temperature value of 60.3125°C.

HEXIDECIMAL DATA | BINARY DATA | MASKED BINARY DATA |

D360h | 1101 0011 0110 0000 | 1101 0011 0110 0000 |

The next step is to take the 2's complement of the masked binary value. This is done by first inverting the masked binary data and then adding 1 to the least significant bit. Inverting the binary number 1101 0011 0110 0000 results in 0010 1100 1001 1111. Adding 1 to the right most bit results in the binary number 0010 1100 1010 0000. This binary number is equal to the decimal number 11424. Because the sign bit indicates the temperature is a negative value, the translated decimal value is divided by -256. So, the decimal value 11424 is divided by -256, resulting in a decimal temperature value of -44.625°C.

62h (V_{CC} MSB) |
63h (V_{CC} LSB) |
||||||||||||||

2^{15} |
2^{14} |
2^{13} |
2^{12} |
2^{11} |
2^{10} |
2^{9} |
2^{8} |
2^{7} |
2^{6} |
2^{5} |
2^{4} |
2^{3} |
2^{2} |
2^{1} |
2^{0} |

2^{15} |
2^{14} |
2^{13} |
2^{12} |
2^{11} |
2^{10} |
2^{9} |
2^{8} |
2^{7} |
2^{6} |
2^{5} |
2^{4} |
0 |
0 |
0 |
0 |

As an example, the values read from 62h and 63h are found to be D7A0h. Translating this number into a decimal results in a value of 55200. Multiplying this value by the scaling factor of 100µV results in the scaled voltage value of 5.520V.

64h (MON1 MSB) | 65h (MON1 LSB) | ||||||||||||||

66h (MON2 MSB) | 67h (MON2 LSB) | ||||||||||||||

68h (MON3 MSB, DS1858 only) | 69h (MON3 LSB, DS1858 only) | ||||||||||||||

2^{15} |
2^{14} |
2^{13} |
2^{12} |
2^{11} |
2^{10} |
2^{9} |
2^{8} |
2^{7} |
2^{6} |
2^{5} |
2^{4} |
2^{3} |
2^{2} |
2^{1} |
2^{0} |

2^{15} |
2^{14} |
2^{13} |
2^{12} |
2^{11} |
2^{10} |
2^{9} |
2^{8} |
2^{7} |
2^{6} |
2^{5} |
2^{4} |
0 |
0 |
0 |
0 |

As an example, the hex value of 9E70h is read from the two address locations. After masking the 4 lower bits with 0's, the binary value is determined to be 1001 1110 0111 0000. The decimal equivalent is 40560. Multiplying this value by the scaling factor of 38.147µV results in the scaled voltage value of 1.547V.