Hardware Reference
In-Depth Information
Overall Protocol
The overall signal protocol works like this:
1.
The line idles high because of the pull-up resistor.
2.
The master pulls the line low for at least 18 ms to signal a read
request and then releases the bus, allowing the line to return
to a high state.
3.
After a pause of about 20 to 40 ms, the sensor responds by
bringing the line low for 80 ms and then allows the line to
return high for a further 80 ms. This signals its intention to
return data.
4.
Forty bits of information are then written out to the bus: each
bit starting with a 50 ms low followed by:
a.
26 to 28 ms of high to indicate a 0 bit
b.
70 ms of high to indicate a 1 bit
5.
The transmission ends with the sensor bringing the line low
one more time for 50 ms.
6.
The sensor releases the bus, allowing the line to return to a
high idle state.
Figure 1-3 shows the overall protocol of the sensor. Master control is shown in thick
lines, while sensor control is shown in thin lines. Initially, the bus sits idle until the master
brings the line low and releases it (labeled Request). The sensor grabs the bus and signals
that it is responding (80 ms low, followed by 80 ms high). The sensor continues with 40 bits
of sensor data, ending with one more transition to low (labeled End) to mark the end of
the last bit.
Figure 1-3. General DHT11 protocol
 
Search WWH ::




Custom Search