Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    Also if I want to disable TMR0 interrupts inside the timer0 INT Handler, will the Interrupts be enabled on exiting the routine? Like this:

    Code:
    INT_Service_TMR0:
    @ INT_DISABLE TMR0_INT
        tmr0=21                 'Preload for 60msec time out
        timer0=1                'timer 0 has timed out flag
    @ INT_RETURN    <<<<<<<<----------------Here I do not want to enable timer0
    No it will not be re-enabled automatically.

    And you won't get any more interrupts from the timer untill there's an @ INT_ENABLE TMR0_INT somewhere else in the program.

    The Timer will continue to run and overflow, so the next time you Enable the timer ints ... make sure you clear the flag first or it will immediately jump into an unwanted INT.
    @ INT_CLEAR TMR0_INT
    <br>
    DT

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default

    OK. Better is to use Tmr1 but not available at the moment.

    Thank you very much.
    Ioannis

  3. #3


    Did you find this post helpful? Yes | No

    Smile

    I still had some strange anomalies going on...
    reading GPIO.2 to a testvariable (Testbit VAR BIT BANK0)
    just before the @ INT_RETURN seems to solve those...

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


    Did you find this post helpful? Yes | No

    Default

    Good Point Michael,

    I'll have to remember that.
    <br>
    DT

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 : 4

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