Skip to main content
gurnett2
Associate II
May 10, 2010
Question

Best way to measure time difference between two signals

  • May 10, 2010
  • 2 replies
  • 799 views
Posted on May 10, 2010 at 14:56

Best way to measure time difference between two signals

    This topic has been closed for replies.

    2 replies

    raptorhal2
    Lead
    May 17, 2011
    Posted on May 17, 2011 at 13:50

    Set up TIM3 and TIM4 counters to the same frequency. Capture the TIM3 and TIM4 counter registers when the respective channel 1 pulses occur. When the second pulse occurs, subtract the first captured counter value from the second captured counter value and allow for counter overflow. Then it is simple arithmetic to convert pulses at the counter frequency to a time difference.

    If you need more help than this, restate the request.

    Cheers, Hal

    gurnett2
    gurnett2Author
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:50

    Worked a treat.. Thanks