16F88 Interrupt


Results 1 to 3 of 3

Thread: 16F88 Interrupt

Threaded View

  1. #1
    sskeet's Avatar
    sskeet Guest

    Default 16F88 Interrupt

    Trying to get my interrupt RB0 pin to accept a rising edge interrupt, but no matter what it keeps expecting a falling edge...anyone know what i am doing wrong?

    The code works if I ground RB0 (it triggers the interrupt), but I want the interrupt to trigger when 5v is applied (rising edge).

    --------------

    @ DEVICE INTRC_OSC, LVP_OFF, WDT_OFF, MCLR_OFF

    DEFINE OSC 8

    OSCCON = %01110000 ' INTRC = 8MHz

    OPTION_REG.6=1 'Trigger on rising edge
    INTCON = %10010000 'Enable INTE
    INTCON.1 = 0 'Clear RB0/INT External Interrupt Flag bit

    On Interrupt Goto UpdateCounter

    PORTB=0
    Pause 500 ' Wait for startup
    LOW PORTB.3

    loop:

    HIGH PORTB.4
    Pause 2000 ' Wait 5 second

    LOW PORTB.4
    Pause 2000 ' Wait 5 second
    Goto loop ' Do it forever

    Disable
    UpdateCounter:
    LOW PORTB.4
    HIGH PORTB.3
    pause 2000
    LOW PORTB.3

    INTCON.1=0 're-enable interrupts

    resume
    ENABLE
    GOTO loop

    END
    Last edited by sskeet; - 24th January 2006 at 01:47.

Similar Threads

  1. 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
  2. 16f88 interrupt
    By tur_bot in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd April 2008, 11:35
  3. NEWBIE: Some basic questions using interrupts
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2006, 02:59
  4. How to use an Interrupt to drive a menu on 16f88
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th March 2005, 01:16
  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