Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PicBasic]DHT22 interface problem

Status
Not open for further replies.

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:
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.
 

what is the time period between high led and low led ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top