This topic shows how to interface PIC16F877A microcontroller with DHT22 sensor with hardware circuit.Related topic:
The following topic shows PIC16F877A microcontroller and DHT22 Proteus simulation and some details about this sensor.PIC16F877A and DHT22(AM2302, RHT03) sensor Proteus simulationInterfacing PIC16F877A with DHT22(AM2302, RHT03) sensor circuit:
The following circuit schematic shows complete project circuit.

The circuit is simple, there is the microcontroller PIC16F877A, DHT22 sensor and 1602 LCD to display humidity and temperature results.Interfacing PIC16F877A with DHT22(AM2302, RHT03) sensor CCS C code:
The interfacing code is written with CCS PIC C compiler PCWHD version 5.051.
If you want to understand the code please read the DHT22 datasheet.