what's wrong with this interrupt


Results 1 to 7 of 7

Threaded View

  1. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Read portB on entry into the interrupt routine to end the mismatch condition.

    SomeVar = PORTB ' read portB

    Then clear the interrupt flag before exiting your interrupt routine.

    INTCON.0 = 0 ' RB port change int flag is cleared.

    Now whenever portB is different from the last value read, INTCON.0 will be set, and you'll vector back to your interrupt routine.

    Read this app note for more details:
    http://ww1.microchip.com/downloads/e...tes/00566b.pdf
    Last edited by Bruce; - 2nd February 2006 at 16:37.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Won't go back to SLEEP after 1st Interrupt
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 29th June 2009, 09:00
  2. Can't ID interrupt source with this IntHandler??
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd June 2009, 02:35
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 01:07

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