12.8 Acknowledgement
After receiving a command from the microcontroller, the sensor issues an acknowledgement pulse by pulling the DATA line LOW for one clock cycle. This takes place after the falling edge of the 8th clock on the SCK line, and the DATA line is pulled LOW until the end of the 9th clock on the SCK line.
12.8.1 The Status Register
The Status register is an internal 8 bit register that controls some functions of the device, such as selecting the measurement resolution, end of battery detection, and use of the internal heater. In order to write a byte to the Status register, the microcontroller must send the write command (‘00110’), followed by the data byte to be written. Note that the sensor generates acknowledge signals in response to receiving both the command and the data byte. Bit 0 of the Status register controls the resolution, such that when this bit is 1, both the temperature resolution and the relative humidity resolution are 12 bits. When this bit is 0, the temperature resolution is 14 bits and the relative humidity resolution is 12 bits.
The sensor includes an on-chip heating element that can be enabled by setting bit 2 of the Status register. By using the heater, it is possible to increase the sensor temperature by 5 to 10 °C. The heater can be useful for analysing the effects of changing the temperature on humidity. Notice that during temperature measurements, the sensor measures the temperature of the heated sensor element and not the ambient temperature. ...
Get Using LEDs, LCDs and GLCDs in Microcontroller Projects now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.