Datasheet

DHT20 Data Sheet
www.aosong.com
Version:V1.0 —— May 2021
10 / 13
7.3 Send Command
After the transmission is started, the first byte of I²C that is subsequently transmitted includes the 7-bit I²C device
address 0x38 and a SDA direction bit x (read R: ‘1’, write W: ‘0’). After the 8th falling edge of the SCL clock, pull
down the SDA pin (ACK bit) to indicate that the sensor data is received normally. After sending the measurement
command 0xAC, the MCU must wait until the measurement is completed.
Bits
Significance
Description
Bit[7]
Busy indication
1-Equipment is busy, in measurement
mode
0- Equipment is idle, in hibernation state
Bit[6:5]
Retain
Retain
Bit[4]
Retain
Retain
Bit[3]
CAL Enable
1 - Calibrated
0 - Uncalibrated
Bit[2:0]
Retain
Retain
Table 9. Status bit description
7.4 Sensor Reading Process
1.After power-on, wait no less than 100ms. Before reading the temperature and humidity value, get a byte of status
word by sending 0x71. If the status word and 0x18 are not equal to 0x18, initialize the 0x1B, 0x1C, 0x1E registers,
details Please refer to our official website routine for the initialization process; if they are equal, proceed to the next
step.
2.Wait 10ms to send the 0xAC command (trigger measurement). This command parameter has two bytes, the first
byte is 0x33, and the second byte is 0x00.
3.Wait 80ms for the measurement to be completed, if the read status word Bit [7] is 0, it means the measurement is
completed, and then six bytes can be read continuously; otherwise, continue to wait.
4.After receiving six bytes, the next byte is the CRC check data. The user can read it out as needed. If the receiving
end needs CRC check, an ACK will be sent after the sixth byte is received. Reply, otherwise send NACK to end, the
initial value of CRC is 0XFF, and the CRC8 check polynomial is:
CRC [7:0] = 1+X
4
+X
5
+X
8
5.Calculate the temperature and humidity value
Note: The calibration status check in the first step only needs to be checked when the power is turned on. No
operation is required during the acquisition process.
Trigger measurement data