微波EDA网,见证研发工程师的成长!
首页 > 硬件设计 > 模拟电路设计 > 如何解释DS1852温度和电压读-How to Interp

如何解释DS1852温度和电压读-How to Interp

时间:05-27 来源:互联网 点击:

    • HEXIDECIMAL DATABINARY DATAMASKED BINARY DATA
      D360h1101 0011 0110 00001101 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 LSB. The binary number 1101 0011 0110 0000 converts to 0010 1100 1001 1111. Adding 1 to the LSB results in the binary number 0010 1100 1010 0000. This binary number is equal to the decimal number 11424. Like in the positive temperature example, the translated decimal value is divided by 256, but is also made negative because the temperature is negative as indicated by the MSB. So, the decimal value 11424 is divided by -256, resulting in a decimal temperature value of -44.625°C.

      VCC Translation

      The VCC value is stored in address locations 62h and 63h. The voltage data is read as an unsigned 16-bit value, however the lower 4 bits are ignored. When reading 62h and 63h, the lower 4 bits should be masked with 0s. Table 4 shows the bit weights of the VCC data and the masking of the 4 lower bits. With the lower 4 bits masked, the maximum range is 65520, which translates to a voltage range of 0V to 6.552V when it is multiplied by the LSB (scaling factor) of 100μV (factory default).

      Table 4. VCC bit weights and masking
      62h (VCC MSB)63h (VCC LSB)
      21521421321221121029282726252423222120
      2152142132122112102928272625240000

      As an example, the values read from 62h and 63h are found to be D7A0h. Translating this number directly to a decimal value results in a value of 55200, which translates to 5.52V when multiplied by the 100μV scaling factor.

      Analog Input (Bin, Pin, Rin) Translations

      The analog input pins Bin, Pin, and Rin are unsigned 16-bit numbers, and are translated the same way. Table 5 shows the bit weights of the analog input bytes and the masking of the 4 lower bits. With the lower 4 bits masked, the maximum range is 65520, which translates to a voltage range of 0V to 2.499V when it is multiplied by the LSB (scaling factor) of 38.147μV (factory default).

      Table 5. Analog input bit weights and masking
      64h (Bin MSB)65h (Bin LSB)
      66h (Pin MSB)67h (Pin LSB)
      68h (Rin MSB)69h (Rin LSB)
      21521421321221121029282726252423222120
      2152142132122112102928272625240000


      As an example, the hex value of 9E70h is read from the two address locations. After masking the 4 lower bits with 0s, 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.

      Conclusion

      This application note demonstrates how to translate the hex data stored in the DS1852 into decimal values. Any questions about this document can be directed to the Mixed-Signal Applications Group atMixedSignal.Apps@dalsemi.com MixedSignal.Apps@dalsemi.com.

      Copyright © 2017-2020 微波EDA网 版权所有

      网站地图

      Top