NEWBIE: Some basic questions using interrupts


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    sougata,

    Thanks for all the advertising of Instant Interrupts. I hope I don't have to pay you.



    Jack,

    The Instant Interrupts are really pretty easy, but you are correct. Understanding how interrupts work first is a good idea.

    1. INTCON<7>, PORTB<:4>?
    This is just a way of showing the BIT's used in a register. INTCON<7> just means BIT number 7 within the INTCON register. It's the same thing as INTCON.7 in PBP.

    PORTB<:4> probably had another number before the colon, like PORTB<7:4>. This shows a range of bits from PORTB.4 to PORTB.7 including 5 and 6.
    2. How do I reset the interrupt flag for RB0?
    INTCON.1 = 0
    3. If the program is executed sequentially, how does an 'Enable Interrupt' AFTER a resume statement ever get executed? Shouldn't the Disable be the first line of the ISR, and the Enable be the last line BEFORE the resume?
    The Enables and Disables are handled at Compile Time, and aren't executed at Run Time.

    From the beginning of the program, or at the point of an ENABLE, PBP starts putting additional code in-between Each and Every line of code in your program that checks to see if an interrupt has occured. Then when it encounters a DISABLE, it's stops putting the checks in. There can be many ENABLES/DISABLES in the program, and only the areas that are ENABLEd can respond to an interrupt.
    Last edited by Darrel Taylor; - 7th March 2006 at 22:01. Reason: beginning of the program
    DT

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Darrel I always mispell your name

    Hi Darrel,

    I am a fan of your instant interrupts myself and found it at a later stage when I have wasted so much energy in writing ISR codes in asm. So letting people know your good work becomes a duty. Most of my developments recently are centered around PIC18F452 and I use both low and high priority in my designs. Hope to accumulate knowledge to be able to contribute to your work. I have walked the path and this forum is a boon for newbies and pros. It is me (us) who should thank you for the great job that you have done and carrying on.

    Jack don't forget to visit http://www.pbpgroup.com

    Regards

    Sougata

  3. #3
    Join Date
    Feb 2006
    Posts
    21


    Did you find this post helpful? Yes | No

    Default

    Thank you. Now I understand. Just got my code working great.

    Thanks again for the education.

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 15:45
  2. interrupts - basic info needed
    By malc-c in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th December 2009, 00:06
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 9th December 2008, 00:40
  4. Instant Interrupts Questions
    By JosueCas in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 4th April 2006, 16:54
  5. Instant interrupts in Basic?
    By Bulman in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 6th January 2006, 12:53

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