External Interrupts Vs. RB/KBI Interrupts?


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Posts
    67

    Default External Interrupts Vs. RB/KBI Interrupts?

    I'm laying out a design with a 18F45K20. What is the difference between the standard "External Interrupts" INT pins, and the other PORTB "Interrupt on Change" pins.

    There are INT0, INT1, and INT2 on RB0, RB1, and RB2.

    There are also KBI0, KBI1, KBI2, and KBI3 on RB4, RB5, RB6, and RB7.

    The data sheet seems to indicate they can each wake the processor from sleep.

    I have 3 inputs I need to handle - a high pulse from another processor, a tilt sensor, and a push button.

    I want to be able to use Darrel's Instant Interrupts to handle any of the 3 inputs, I would also like to use all 3 inputs to wake the processor from sleep. Ideally, I'd like to be able to tell the source of the input after the interrupt occured.

    Does it really matter what pin (an INT pin or a KBI pin) I use for these inputs?

    Thanks!

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kevj View Post
    ... What is the difference between the standard "External Interrupts" INT pins, and the other PORTB "Interrupt on Change" pins.
    The INT0, INT1, and INT2, can be set to trigger on Either the Rising edge, or the Falling edge, both not both. And each one is a separate interrupt source, so it's easy to tell which one triggered.

    KBI0, KBI1, KBI2, and KBI3, as there name implies, are better for KeyBoard Input. They trigger on ANY change rising or falling, and it's up to the program to figure out which one(s) changed because they all funnel into 1 interrupt source.

    > The data sheet seems to indicate they can each wake the processor from sleep.

    Yes. Either way can wake the PIC from sleep.

    > I want to be able to use Darrel's Instant Interrupts to handle any of the 3 inputs

    Good choice.

    > I would also like to use all 3 inputs to wake the processor from sleep. Ideally, I'd like to be able to tell the source of the input after the interrupt occured.

    Not a problem. If you use the INT0-INT2, then each pin will have it's own "Handler".
    DT

Similar Threads

  1. External interrupts
    By naga in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th August 2009, 17:52
  2. Microcode studio - PIC16F877A Interrupts
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th January 2009, 06:10
  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. Using SPI with External Interrupts
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th June 2008, 04:08

Members who have read this thread : 1

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