Timer Interrupt to exit a closed loop


Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146

    Default Timer Interrupt to exit a closed loop

    Hi,
    Damn I am struggling lately, I could really use some help right now.
    I have a program that is capturing different data from both CCP modules, the routine is started by an interrupt on a comparator and I am attempting to limit the duration that the ccp modules are capturing by setting a timer for approx 200ms.

    What Is hapening is that the interrupt timer is flagged but it is looping through the routine again, but only once.

    I have identified where the problem lies and I have stripped out the irrelevant code.

    As can be seen I am using Darrel's Instant Interrupts. I have tried rearanging the placement of the timer0 commands, timer on/off enable/disable I have disabled the flag and set those manually in the INTCON but all to no avail.

    The following code produces a trace on portd that clearly shows the routine passing through the timer0 interrupt sequence twice. As this is a module in larger compilation I would really wish not to ignore this error, besides I dislike things not being correct it is like attempting to sweep things under the carpet,, they will always come back to haunt you!

    Thanks

    ps Now I have to try and find out how to insert the code inside this message.
    Attached Files Attached Files

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. Controlsystem for compact sporting (clay shooting)
    By Fredrick in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2009, 16:48
  3. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  4. Using input from Switch to control a loop
    By MrRoboto in forum mel PIC BASIC
    Replies: 9
    Last Post: - 2nd February 2009, 05:02
  5. Serial Relays
    By tazntex in forum General
    Replies: 3
    Last Post: - 17th May 2007, 17:42

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