Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    btw,
    If I disable INT (INTCON=0) the LCD shows correctly, but of ocurse interrupts are not working.

  2. #2
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    What I do is turn off interrupts before serial and back on after serial completes. Like this:
    Code:
    sendudp:
            INTCON.7 = 0
            SerOut2 PORTC.6, 84, [$50] 'ask siteplayer to send udp
            INTCON.7 = 1
            udpcount = 0 
            gosub delay
            return
    Somewhere in here there is a list of the commands affected by Instant interrupts. I just turn the interrupts off, execute the command and turn the interrupts back on.
    I'm not sure if this is the best way to handle things but it's worked well for me so far.
    Hope this helps.
    "It will never happen here!" just happened here.
    My thoughts and prayers for Sandy Hook victims and families.

  3. #3
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Well,
    What if the interrupts are for the clock ?
    Disabling it will cause the clock not to keep going.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by menta View Post
    Well,
    What if the interrupts are for the clock ?
    Disabling it will cause the clock not to keep going.
    Then add an RTC chip.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi menta,

    Any type of software timed commands like SERIN/OUT, OWIN/OUT, PAUSE, PULSIN/OUT etc, will be disturbed by these types of Interrupts.

    That's why there's an ON INTERRUPT GOTO statement. It reverses the situation, so that the PAUSE, SERIN/OUT etc trash the Interrupts instead, which seems more tolerable to people new to PBP, but just drove me crazy. And is why I ended up with DT_INTS.

    With Interrupts, you need to use HARDWARE solutions instead of the SOFTWARE timed commands, and in your case the 16F887 has a USART on-board that is NOT affected by interrupts.

    So just switch over to HSEROUT, and your problems will vanish.

    DT

  6. #6
    Join Date
    Jun 2008
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Great, will try this.

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi DT,

    This question is not related to the current ongoing subject but is about your int routine.

    Is it safe (or how safe) to call a subroutine inside your interrupt handler?

    Or inside PBP int handler?


    Thanks.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

Similar Threads

  1. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 22:43
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 21:02
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 21:48
  4. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 07:32
  5. Replies: 1
    Last Post: - 1st November 2006, 04:11

Members who have read this thread : 5

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

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