asm interrupts


Closed Thread
Results 1 to 12 of 12

Thread: asm interrupts

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Macgman2000 View Post
    I do clear it at the top. Do I have to clear it while inside the interrupt routine?
    When interrupt fires it sets a flag bit and will not fire again until reset in ISR, that's The word according to my 3 bottles of Miller High Life anyway
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    I clear it here

    T1CON = %00100000 ' stop TMR1
    PIR1.0 = 0 ' clear bit 0 TMR1 interrupt flag
    TMR1H = $8C
    TMR1L = $A0 ' loads 36000 - gives 24 mS on CRO
    T1CON = %00100001 ' start TMR1

    joe, I think you answered my question. It does have to be in the ISR.
    So syntax..... bcf PIR1.0m will this work?

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    You clear it at the beginning, find...but it's likely not set at the beginning...
    What happens when the flag gets set during program execution?
    Refer to the datasheet!

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    When interrupt fires it sets a flag bit and will not fire again until reset in ISR, that's The word according to my 3 bottles of Miller High Life anyway
    Almost, but I think the wording should be 'will continuously fire'...in other words, if the flag stays set (or clear as the case might be), the program returns to the main loop and gets interrupted again straight away.
    But then again...I would never doubt the word of a select beverage...

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 14:45
  2. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  4. help: TMR0 interrupts disabling PORTAchange interrupts???
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th August 2008, 15:10
  5. ASM Interrupts with BASIC code?
    By Desterline in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 31st October 2003, 19:21

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