Time between interupts


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2005
    Posts
    96

    Default Time between interupts

    I'm looking for a creative solution or any ideas for a method of measuring the time between to rising edge interrupts using only pin B0 of an 877a chip.

    I've basically got an external PWM signal that I am monitoring using a B0 pin interupt using the "Instant Interrupts" that Daryl created (Great by the way). The interupt is triggered on the rising edge and processes a small subroutine before exiting the interrupt. After exiting the interupt the PIC processes other code while it looks for the next rising interupt. The interupt and subroutine work great, but I need to know how often the interrupt occurs.

    I have not tried this yet, but I was thinking of using the COUNT command to count the number of pulses over a certain period of time, but I am not sure if the COUNT command will work and not be effected by the interrupt.

    I apreciate any input.

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    If you like Darrel's Instant Interrupts, you also might want to try his routines to measure time between events. His post for that is here

    http://www.picbasic.co.uk/forum/showthread.php?t=365

    If your time is going to be greater than 2^16 instruction, you may need to modify his code to count overflows.

    Paul Borgmeier
    Salt Lake City, Utah
    USA

  3. #3
    Join Date
    Apr 2005
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Thats pretty sweet, I'll have to see if I can get that one to work. It sounds like it will do exactly what I need and much more accurately.

Similar Threads

  1. Help! My 'interupt', erhm ...only interupts the one time?!!!
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd November 2009, 12:49
  2. I don't understand this code!
    By Russ Kincaid in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 13th February 2008, 02:55
  3. Measuring time
    By AugustoPedrone in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th July 2007, 23:46
  4. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  5. Timer in real time
    By martarse in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 29th July 2005, 14:24

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