PULSIN and RCTIME


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511

    Default PULSIN and RCTIME

    Hello Folks,

    Through a recent discussion, some questions came up that was confusing to me.

    the manual says the RCTIME is *basically* 1/2 of the PULSIN time.

    This tells me that PULSIN measures one complete cycle and returns a value. Whether you measure that cycle on the negative end, positive end... the answer is the same.

    There is also a *threshold* and PULSIN AND RCTIME will not be activated until that votage is at that threshold.

    Now lets take a hypothetical situation, and apply my understanding (or what I think I understand), and see what both PULSIN and RCTIME will return ok??? if i am wrong PLEASE correct my thinking!

    1. A wave...(not square wave)

    2. 3.5 volts high...it takes exactly 35 units(whatever measurement you want here) for one complete wave cycle.
    3. Threshold of the pin is 3.4 volts.

    Using pulsin, you will have the following:

    case A: PULSIN pin, positive value
    Value = 35

    case B: PULSIN pin, negative value
    Value =35

    Using RCTIME, you will have the following:

    case A: RCTIME pin, positive, value
    VALUE = 2

    case B: RCTIME pin negative value
    Value = 33


    Am I thinking correctly on this situation? Please correct my errors on my thinking.....if Ia m not correct, then what IS the difference between RCTIME and PULSIN?

    Dwayne (thanks in advance!)
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Talking

    Hi, Dwayne ...

    Pulsin measures between 2 transitions on an input ( low to high and high to low i.e )

    RCTime measures from the moment when order "RCTIME" is executed by CPU, to the next transition on the input ...

    so, in your example it's right for pulsin measure, as max voltage is very close to input trigger level ( sawtooth waveform ??? )

    BUT, for RCTIME, it is the sum Pos+neg value wich stays constant.
    pos value can take every value from 1 to 34 ...depending on the moment RCTIME is executed in your program . Add one or two lines before RCtime, and you'll see what happens.

    Little stupid light turned Green, at this time ???

    Alain

  3. #3
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hell Alain,

    Alain>>Little stupid light turned Green, at this time ???<<

    Yes!... that stupid light finally came on <g>. Thanks for explaining it. Its one of those crazy lifetime comments I make. <g>.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

Similar Threads

  1. PULSIN & RCTIME resolution calculation
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 5th January 2010, 14:34
  2. Better understanding PULSIN
    By Wirecut in forum mel PIC BASIC
    Replies: 12
    Last Post: - 29th June 2008, 10:17
  3. Pulse Width Measurement
    By atomski in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 29th January 2005, 00:53

Members who have read this thread : 1

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