diff --git a/tech/DHT11.wiki b/tech/DHT11.wiki index c51eb69..dd2c7a6 100644 --- a/tech/DHT11.wiki +++ b/tech/DHT11.wiki @@ -19,3 +19,22 @@ Data is sent using a single bus line. This bus line sends info in the following manner. | Humidity int (8b) | Humidity decimal (8b) | Temp int (8b) | Temp decimal (8b) | Parity | + +Parity is calculated by adding all of the four proceeding values together. +Whatever the result is should match the Parity. The values sent back should be +read as Big Endian; the most signifigant bit comes first for each 8bit block of +data. + +== Steps to read Data == + +1) After the DHT11 has been turned on, in must stay on for at least 1S in order + for it to calibrate itself properly. Do not probe it earlier than this. +2) The data line must be held low for *no less than 18ms*. After this time, the + pin on the MCU must switch to being in an input state. +3) The DHT11 will respond with 80us of VCC, followed by 80us of GND. This is + used as a way of calibrating the format in which the device will reply with + data. +4) After this exactly 40bits of data will be sent back. The format for each + type of response is as shown. + - A one (1) consists of 50us of GND, followed by 26-28us of VCC + - A zero (0) consists of 50us of GND, followed by 70us of VCC.