Measure time in mS between two pulses


Results 1 to 9 of 9

Threaded View

  1. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: Measure time in mS between two pulses

    Rough explanation of something.

    Use an interrupt to start/stop the timebase/counter. Use a fixed timebase and monitor the timer overflow. at each overflow, increment a variable.

    Select a interuptable pin
    Set it to rising edge
    once the interrupt happen Start the Timebase/counter

    At next interrupt. Stop timer and process the maths.

    Overflow can be managed with an ISR.

    When well done, you can have a really accurate reading in uSec precision or so. Sounds like a OlympicTimer
    Last edited by mister_e; - 7th March 2011 at 08:10.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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