Mazytis
Newbie level 3
- Joined
- Jul 16, 2015
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 27
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
By the way, sorry for my English speech.