My TMR1_INT Blinky is not blinking


+ Reply to Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: My TMR1_INT Blinky is not blinking

    Quote Originally Posted by richard View Post
    ...just how does PIE4.0 = 0 stop the timer ?...
    (also p.138)

    bit 0 TMR1IE: Timer1 Overflow Interrupt Enable bit

    1 = Enables the Timer1 overflow interrupt
    0 = Enables the Timer1 overflow interrupt
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: My TMR1_INT Blinky is not blinking

    pic16 's have one level of interrupt , therefore an interrupt can never be interrupted

    disabling the timer1 interrupt inside an interrupt is a pointless exercises that accomplishes exactly nothing
    except to waste machine cycles

    disabling the timer1 interrupt does not in any way shape or form stop the timer from running.

    the only way to stop the timer is to either turn it off or stop its clock signal.
    Warning I'm not a teacher

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: My TMR1_INT Blinky is not blinking

    Quote Originally Posted by richard View Post
    pic16 's have one level of interrupt , therefore an interrupt can never be interrupted ...
    No, but any interrupt triggered while an ISR is running will be handled once the ISR finishes.

    (p.129 16F18877)

    Note

    1: Individual interrupt flag bits are set, regardless of the state of any other enable bits.

    2: All interrupts will be ignored while the GIE bit is cleared. Any interrupt occurring while the GIE bit is clear will be serviced when the GIE bit is set again.
    So you can have multiple Timers running at the same time (including USART interrupts and others).

    No...?
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: My TMR1_INT Blinky is not blinking

    So you can have multiple Timers running at the same time (including USART interrupts and others).
    of course you can, as many enabled as you see fit

    but one and only one can be serviced at a time, and it cannot be interrupted. first come first served.
    additional interrupts are serviced sequentially, one and only one at a time in the order the interrupt handler runs them.
    hence keep isr's short
    Warning I'm not a teacher

Similar Threads

  1. Replies: 3
    Last Post: - 15th April 2015, 04:58
  2. MIBAM blinky on 16f628
    By ShoKre in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th December 2013, 08:58
  3. Replies: 6
    Last Post: - 25th April 2010, 04:45
  4. Blinky not working with TOGGLE
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2008, 08:45
  5. My first Blinky!
    By nomad in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 25th September 2007, 17:29

Members who have read this thread : 7

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