how to use INTERRUPT?


Closed Thread
Results 1 to 8 of 8

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: how to use INTERRUPT?

    your not giving us much to work on , but from the data sheet and if you are using INT/int on gp2 then

    12.4.1 GP2/INT INTERRUPT
    The external interrupt on the GP2/INT pin is edgetriggered;
    either on the rising edge if the INTEDG bit of
    the OPTION register is set, or the falling edge, if the
    INTEDG bit is clear. When a valid edge appears on the
    GP2/INT pin, the INTF bit of the INTCON register is set.
    This interrupt can be disabled by clearing the INTE
    control bit of the INTCON register. The INTF bit must
    be cleared by software in the Interrupt Service Routine
    before re-enabling this interrupt. The GP2/INT interrupt
    can wake-up the processor from Sleep, if the INTE bit
    was set prior to going into Sleep. See Section 12.7
    “Power-Down Mode (Sleep)” for details on Sleep and
    Figure 12-9 for timing of wake-up from Sleep through
    GP2/INT interrupt.
    if you want more help post your code and a sketch/schematic of your setup

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: how to use INTERRUPT?

    Quote Originally Posted by richard View Post
    your not giving us much to work on , but from the data sheet and if you are using INT/int on gp2 then



    if you want more help post your code and a sketch/schematic of your setup
    Ah....so the interrupt pin must to be GP2 (pin 5)? I can't use any other pin? And "OPTIONREG.6 = 0" would need to be added to my code, not changed in the .bas define files? I shouldn't have to modify anything in the .bas files right?

    My code thus far looks exactly likes exactly like the example, but I changed the LED1 var to GPIO.0. I'm following the same schematic as well (going to different I/Os), but I haven't made it that far because PBP won't let me compile.

Similar Threads

  1. Interrupt
    By gunayburak in forum General
    Replies: 1
    Last Post: - 26th December 2012, 06:19
  2. Need help with interrupt
    By mbox in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th August 2010, 16:48
  3. RX interrupt
    By Arciure in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 5th March 2010, 17:23
  4. I need help with Interrupt
    By wildbilly in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st September 2007, 19:16
  5. Replies: 0
    Last Post: - 27th August 2004, 07:20

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