DHT11 Driver for C18(Generic)
Basic generic driver for DHT11 Humidity & Temperature sensors.
About this Code Example
This example coded on one of our development kits but can be fit any MCU with small change as we make it work on lots of other MCUs as well. This example uses PIC18F4520 with 20Mhz crystal. Check main.c for more information.
This code uses CRC code from sensor to check correctness of reading. Thus if you get weird values from sensors. Do not forget to calibrate it. Check its datasheet as it says.
Step one: Keep the DHT sensor at the condition of Temperature 50~60 Celsius, humidity <10%RH for 2 hours;
Step two: Keep the DHT sensor at the condition of Temperature 20~30Celsius, humidity >70%RH for 5 hours.
- Jun 21, 2013