Remove Text Formatting
Loading...

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Location
    France
    Posts
    44

    Default DHT22 and PIC18F25K22

    Hi I'm using a PIC18F25K22 to drive 2x DHT22.
    I found here some code working on PORTB.4
    The other DHT is connected on PORTB.2 and... not working
    I tried to exchange the 2 DHT22 without success. The 2 DHT22 are working fine on portB.4
    Name:  dht22.JPG
Views: 56
Size:  138.0 KB

    sequence is:
    TRISB.2 = 1 'input
    my program... then
    TRISB.2 = 0 'output
    PORTB.2 = 0 'low

    With my DSO, I can see something strange. It takes more than 1mSec to become low (see curve)
    Name:  elecdif.jpg
Views: 55
Size:  133.3 KB


    This is only on PORTB.2 !
    May be you have an idea ? (I'm using PBP2.60)
    Regards
    Last edited by harryweb; - 13th November 2017 at 21:46.

  2. #2
    Join Date
    Oct 2009
    Posts
    535

    Default Re: DHT22 and PIC18F25K22

    Have a read of this thread http://www.picbasic.co.uk/forum/showthread.php?t=19975

    The excellent library file allows multiple sensors to be used (I have four running to monitor temperature and humidity in my reptile enclosures)

  3. #3
    Join Date
    Sep 2005
    Location
    France
    Posts
    44

    Default Re: DHT22 and PIC18F25K22

    Hi Scampy,

    Yes this code is well done... But I'd like to use my own...
    I tried another PIC (18f2520) = same pb, changing pullup resistors, capacitors...
    I just found the problem... It's an hardware problem. Can't see it without binoculars... soldering to ground on PCB was not good
    Thank you.
    Name:  soudure.JPG
Views: 20
Size:  51.1 KB

Similar Threads

  1. pic18f25k22 clock
    By connortop in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th September 2016, 17:42
  2. DHT22, AM2302 and pic18F2320
    By bitmaniac in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 15th November 2015, 01:42
  3. DHT22 interface problem
    By mazytis in forum Code Examples
    Replies: 2
    Last Post: - 25th July 2015, 03:01
  4. dht22 using bit field array and ext references
    By richard in forum Code Examples
    Replies: 4
    Last Post: - 1st April 2015, 03:20
  5. PIC18f25k22 help with OSC configs
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th February 2012, 19:23

Members who have read this thread : 16

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts