RCTIME not getting a result


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190

    Default RCTIME not getting a result

    I decided to make another 'chicken door' again this time using a 16f84. As it has no ADC for the LDR I tried using RCTIME but all I get is either 0 or 1 as the result, is it my code?

    I tried putting one end of the LDR to 5v the other to a .1 cap which then goes to the pin.
    I tried LDR to pin , other end to cap to ground.

    Both give same result.

    I'm using:-

    LOW PortB.0
    PAUSE 10
    RCTIME PortB.0,0,LDR
    LCDOUT $FE,$80,LDR

  2. #2
    Join Date
    Dec 2011
    Location
    IO93ok
    Posts
    190


    Did you find this post helpful? Yes | No

    Default Re: RCTIME not getting a result

    OK, no-one answered my simple question.

    Fortunately a YouTube video answered it although it's in Hungarian I think.

    The PBP manual doesn't make it very clear but the video shows that two pins are necessary to use RCTIME ?
    One to charge up the cap the other to measure the discharge.
    One via a 1k resistor the other via a 1Meg resistor and .1 capacitor.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: RCTIME not getting a result

    shows that two pins are necessary to use RCTIME
    No, only one pin is used

    Code:
    '        CAP        POT
    ' +5------||---;---/\/\------ZERO
    '              |
    '              |
    ' PIN-----/\/\--'
    '         10K
    But you probably will not be happy with the results. Use a MCU with ADC.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 0

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