Pulse In??


Closed Thread
Results 1 to 4 of 4

Thread: Pulse In??

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default Pulse In??

    Hi All!
    Maybe a silly question and if you wished to measure the time (duration) of a 5 volt pulse I know you would use pulsin as
    Plusin PortA.0,1,w3 (the 1 meaning when the pulse goes high). Now if you wish to know the time the signal is low you would use
    Plusin PortA.0,0,w4. The question does the second measurement of time the signal is low happen immediately after the measurement of the high timing or does it wait until the next high to low trasition? Thanks, Ed

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Pulse In??

    No, it "triggers" on the rising or falling edge of the signal.
    Your PULSIN PortA.0, 1, W3 will start timing on the rising edge and stop timing on the falling edge. The next PULSIN PortA.0, 0, W4 won't be able to "see" the same falling edge that the first one sees.

    /Henrik.

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


    Did you find this post helpful? Yes | No

    Default Re: Pulse In??

    Code:
    PULSIN Input, 1, HiPart
    RCTIME Input, 0, LoPart
    That's done ... ( may be some µS ( 4 or 6 ? ) to add to LoPart to be really true ... )

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Pulse In??

    Thank you so much Alian!
    Had not thought of that as a possibility!

    Best, Ed

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