The steps to calculate the Set High Alert, Clear High Alert, Set Low Alert, and Clear Low Alert thresholds are listed below:
- Select the desired relative humidity and temperature threshold to program, and the programmed value.
- Convert the relative humidity and temperature threshold value to its respective 16-bit binary value
- Retain the 7 MSBs for relative humidity and the 9 MSBs for temperature
- Concatenate the 7 MSBs for relative humidity with the 9 MSBs for temperature to complete the 16-bit threshold representation
- Calculate the CRC byte from the 16-bit threshold value
An example is provided below.
- In this case, the Set High Alert threshold will be programmed to 90% RH and 65°C
- 90% RH converts to 0b1110011001100111 and 65°C T converts to 0b1010000011101011
- 7 MSBs for 90% RH is 0b1110011 and 9 MSBs for 65°C T is 0b101000001
- After concatenation of the relative humidity and temperature MSBs, the threshold representation is 0b1110011101000001 = 0xE741
- For 0xE741, this corresponds to a CRC byte 0x55
- Figure 8-27 illustrates the appropriate command to send to the HDC302x-Q1.
- The HDC302x-Q1 will respond to reception of an incorrect CRC byte with a I2C NACK.