Interrupt problem.


Results 1 to 15 of 15

Threaded View

  1. #1
    Peter Oors's Avatar
    Peter Oors Guest

    Default Interrupt problem.

    Hello,

    It's the first time I try to use ON INTERRUPT.
    If I compile my program (PBP2.45a), I get an error.
    Error test.mac 46: [235] Opcode Expected Instead of '1'
    If I disable ON INTERRUPT with a " ' " , compiling is ok.

    What's wrong?

    @ DEVICE PIC16F819, INTRC_OSC_NOCLKOUT, MCLR_OFF
    OPTION_REG = %10000000 ' Turn off pull-up resistors
    DEFINE ONINT_USED 1
    OSCCON=$60 ' osc. controller, 70=8MHz, 60=4MHz
    adcon1=7 ' comperator off
    TRISA=%00011111
    TRISB=%11110000
    led VAR PORTB.0

    ON INTERRUPT GoTo myint ' Define interrupt handler
    INTCON = %10001000 ' Enable RBIE interrupt
    loop:
    led=1 ' Turn LED on
    GoTo loop ' Do it forever
    myint:
    Disable ' No interrupts past this point
    led=0 ' If we get here, turn LED off
    Pause 500 ' Wait .5 seconds
    INTCON.0 = 0 ' Clear interrupt flag
    Resume
    Enable

    Stop

    Thanks for the help,
    Peter
    Last edited by Peter Oors; - 20th September 2004 at 05:51.

Similar Threads

  1. problem using GOSUB under interrupt
    By fobya71 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 5th March 2010, 19:52
  2. Problem with Interrupt on PIC18F4620 PORTB
    By rookie in forum Off Topic
    Replies: 1
    Last Post: - 22nd March 2007, 01:34
  3. Interrupt Problem
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th November 2005, 20:58
  4. Interrupt stack overflow problem with Resume {label}
    By Yuantu Huang in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 3rd May 2005, 01:17
  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