Help with programming the sensor DHT11
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Help with programming the sensor DHT11
Hello
to finich my program http://www.matrixmultimedia.com/mmforum ... =3&t=11509
I need a help to program the sensor DHT 11 with flowcode using 16f877A
Does somebody worked with this sensor ?
Really I need your help
Thank you
to finich my program http://www.matrixmultimedia.com/mmforum ... =3&t=11509
I need a help to program the sensor DHT 11 with flowcode using 16f877A
Does somebody worked with this sensor ?
Really I need your help
Thank you
- JohnCrow
- Valued Contributor
- Posts: 1367
- Joined: Wed Sep 19, 2007 1:21 pm
- Location: Lincolnshire
- Has thanked: 364 times
- Been thanked: 716 times
- Contact:
Re: Help with programming the sensor DHT11
Hi
Sorry , Im not familiar with that sensor.
I've just looked on you-tube and there are a lot of tutorials about it with both PICs and Arduinos
Maybe you will find some information on that site.
Sorry , Im not familiar with that sensor.
I've just looked on you-tube and there are a lot of tutorials about it with both PICs and Arduinos
Maybe you will find some information on that site.
1 in 10 people understand binary, the other one doesn't !
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Hi
I am writing code for you for the chip with the help of Ben's earlier post. Hopefully I can finish that tonight.
Thanks,
I am writing code for you for the chip with the help of Ben's earlier post. Hopefully I can finish that tonight.
Thanks,
- Steve001
- Valued Contributor
- Posts: 1189
- Joined: Wed Dec 31, 2008 3:37 pm
- Has thanked: 460 times
- Been thanked: 523 times
- Contact:
Re: Help with programming the sensor DHT11
Success always occurs in private and failure in full view.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Hi Steve
I am using that link and Ben's macro for data read to write flowcode file. You have guided to right one.
I am using that link and Ben's macro for data read to write flowcode file. You have guided to right one.
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
thank you for you help
I m also trying to write the code in flowcode but i didn't arrive yet
I m also trying to write the code in flowcode but i didn't arrive yet
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
this is a part of the code by ben
http://www.matrixmultimedia.com/mmforum ... T11#p36845
http://www.matrixmultimedia.com/mmforum ... T11#p36845
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Here is the code I have been working on..I have followed the c code given in the following link
http://embedded-lab.com/blog/?p=4333
Most of the thing I have tried to follow and even PIC but you can change that to any PIC you want. Please let me know how it's behaving. I don't have the sensor that's why I can't test it but hopefully it will work.
http://embedded-lab.com/blog/?p=4333
Most of the thing I have tried to follow and even PIC but you can change that to any PIC you want. Please let me know how it's behaving. I don't have the sensor that's why I can't test it but hopefully it will work.
- Attachments
-
- DHT11.fcf
- (26.08 KiB) Downloaded 619 times
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
Thank you so much ; I will test it in the test board and i will tell you the result
I hope that it work
I hope that it work
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
Hello Enamul
The code of the dht11 doesn't work , it shows always No response from the sensor
I tested he .hex of http://embedded-lab.com/blog/?p=4333 and it works correctly
so I am trying to change some parametres
The code of the dht11 doesn't work , it shows always No response from the sensor
I tested he .hex of http://embedded-lab.com/blog/?p=4333 and it works correctly
so I am trying to change some parametres
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Hi
I think there is a problem in the code for managing TMR0..I have modified that. Can you please try now? By the way what crystal frequency you are using for the code I have posted? Time is very critical for this device and the code.
It need to be 4MHz..
I think there is a problem in the code for managing TMR0..I have modified that. Can you please try now? By the way what crystal frequency you are using for the code I have posted? Time is very critical for this device and the code.
It need to be 4MHz..
- Attachments
-
- DHT11.fcf
- (27.15 KiB) Downloaded 439 times
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
yes I am using the 4MHZ crystal
ok i will try this code now
ok i will try this code now
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
now it didn't show anything ! I wrote "hello" in the beginnig of the program to see if te program is running and it is shown
then nothing in te LCD ! and when I remove the data pins it shows checkSum ERROR
that means that CheckSum is not equal to (RH_Byte1 + RH_Byte2 + T_Byte1 + T_Byte2)
so the program entred in the working mode .
then nothing in te LCD ! and when I remove the data pins it shows checkSum ERROR
that means that CheckSum is not equal to (RH_Byte1 + RH_Byte2 + T_Byte1 + T_Byte2)
so the program entred in the working mode .
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Yes, you are right. If it's showing nothing in the LCD that means program entered in the working mode. That's a good sign. But it seems to me now that Read_Byte macro is not working properly. If it stuck at some point only then LCD can be blank otherwise LCD should say "Checksum error!" or right results. I have to have a look again in the Read_Byte macro..but that is ok I think as Ben has written that.
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Hi
I have checked the code but I can't get any issue. Just disabled TMR0 after timing requirements. You can try if still don't work what I can do I have to order one for me to test practically. You have to wait couple of days in that case.
I have checked the code but I can't get any issue. Just disabled TMR0 after timing requirements. You can try if still don't work what I can do I have to order one for me to test practically. You have to wait couple of days in that case.
- Attachments
-
- DHT11.fcf
- (27.79 KiB) Downloaded 316 times
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Hi
I have ordered one for me..I will get that in Friday..so hopefully we can solve that by Friday
I have ordered one for me..I will get that in Friday..so hopefully we can solve that by Friday
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Hi
One more try with change in checksum...as the datasheet says checksum will be the last byte of the summation of first 4 bytes.
One more try with change in checksum...as the datasheet says checksum will be the last byte of the summation of first 4 bytes.
- Attachments
-
- DHT11.fcf
- (28.09 KiB) Downloaded 403 times
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
Nothing has changed
OK Enamul ; until that moment I will try with it again
Tank you so much
OK Enamul ; until that moment I will try with it again
Tank you so much
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
yes I tried it but nothing new ; when I removed the dht11
and I start the lcd shows CheckSum Error !! Normally it goes to NOT response , isn't ?
and I start the lcd shows CheckSum Error !! Normally it goes to NOT response , isn't ?
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
After spending one whole evening I have manged to make the sensor working...
I will make a separate thread for that...I will post link to you..but you need 20MHz crystal 4MHz isn't enough for this.
I will make a separate thread for that...I will post link to you..but you need 20MHz crystal 4MHz isn't enough for this.
-
- Posts: 60
- Joined: Thu Nov 15, 2012 1:21 pm
- Has thanked: 14 times
- Been thanked: 4 times
- Contact:
Re: Help with programming the sensor DHT11
Good work , what was the problem in the precedent proram ? No problem for the quartz
I think it's the same thing when I use it with another pic 18f , I mean th horloge doesn't change
Thanks
I think it's the same thing when I use it with another pic 18f , I mean th horloge doesn't change
Thanks
- Enamul
- Posts: 1772
- Joined: Mon Mar 05, 2012 11:34 pm
- Location: Nottingham, UK
- Has thanked: 271 times
- Been thanked: 814 times
- Contact:
Re: Help with programming the sensor DHT11
Here is the link of the post...
http://www.matrixmultimedia.com/mmforum ... =7&t=11555
http://www.matrixmultimedia.com/mmforum ... =7&t=11555