IOC question


+ Reply to Thread
Results 1 to 5 of 5

Thread: IOC question

  1. #1
    Join Date
    May 2007
    Location
    Suffolk, UK
    Posts
    59

    Default IOC question

    I would like to be clear about IOC routines and would be grateful for confirmation or correction of my understanding. AN566 helps but leaves me with a question...

    Firstly for a pulse that is longer than the interrupt routine……
    A. The port should be read to a variable to end the mismatch condition
    B. The flag is cleared
    C. The interrupt routine is completed.

    In this case if an interrupt is called by a rising pulse, it will also be called again later when the pulse returns to zero.

    If the interrupt routine is lengthy and the pulse is shorter than the routine then that routine will presumably end with another mismatch. In this case I guess the port should be read again to the (port) variable at the end of the routine?

    Should the flag again be cleared? If so can the flag just be cleared once in the routine, at the end?

    Thank you for yr help


    Adrian

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

    Default

    Can you describe your whole project?
    Steve

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

  3. #3
    Join Date
    May 2007
    Location
    Suffolk, UK
    Posts
    59

    Default

    Thanks, but there's no project yet.I'm trying to understand IOCs as a theoretical exercise rather than a problem that has come up in a project. I can guess it will rear its head soon though and I want to understand what I'm doing!!

    Adrian

  4. #4
    Join Date
    May 2007
    Location
    Suffolk, UK
    Posts
    59

    Default

    I've sorted it now, Steve.. many thanks

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

    Default

    Thanks for sharing your code
    Steve

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

Similar Threads

  1. A Simple IOC Routine (Interrupt On Change)
    By lugo.p in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th March 2010, 20:53
  2. Circuit Design Question
    By bradb in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th August 2009, 08:18
  3. Shiftout question.
    By muddy0409 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 2nd April 2007, 15:57
  4. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 10:45
  5. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts