Hi, I'm trying to get response from DHT22 sensor with PIC12F675, but something is wrong... Here is my code:
By the way, sorry for my English speech.Code:#CONFIG __config _HS_OSC & _WDT_OFF & _CP_OFF & _MCLRE_OFF & _BODEN_OFF & _PWRTE_OFF #ENDCONFIG DEFINE OSC 4 CMCON = 7 : OPTION_REG.7 = 0 LED var GPIO.2 DHT var GPIO.0 pause 100 output DHT high DHT pause 10 low dht pause 10 high dht pauseus 40 input dht while dht = 1 high led : pause 50 low led : pause 50 wend while dht = 0 high led : pause 50 low led : pause 50 wend end




Bookmarks