This should work for you. It works in my simulator.
Also, since PBP's ON INTERRUPT only checks to see if an interrupt has occurred between PBP commands, you may want to use a loop counter in your main routine and use short pauses. This is how I revised your code.
Comments are added to the code below.
Good Luck.
Code:'PIC 12F683 #CONFIG __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _CP_OFF #ENDCONFIG 'DEFINE OCS 4 '4mhz ocsillator DEFINE OSC 4 '4mhz ocsillator ANSEL = 0 'all I/O digital CMCON0 = 7 'comparator off LED VAR GPIO.0 'LED pin 7 LED2 VAR GPIO.1 'LED2 pin 6 loop1 var byte ' Loop 1 Counter ON INTERRUPT GOTO mode1 'interrupt handler is mode1 INTCON = %10001000 'enable GIE and GPIE; clear GPIF IOC = %00001000 ' enable IOC3 (GPIO3 Interrupt on change) ENABLE main: do for loop1 = 1 to 50 HIGH LED 'led on 'PAUSE 500 'delay 0.5 second pause 10 '10 ms next loop1 for loop1 = 1 to 50 LOW LED 'led off 'PAUSE 500 'delay 0.5 second pause 10 '10 ms next loop1 'GOTO main 'repeat loop DISABLE 'disable interrupts in handler mode1: if INTCON.0 = 1 then 'one of the GPIO<5:0> pins changed state (must be cleared in software) HIGH LED2 'led2 on PAUSE 50 LOW led2 'led2 off PAUSE 50 endif INTCON = %10001000 'enable GIE and GPIE; clear GPIF RESUME 'return to where left off ENABLE 'enable interrupts end 'got here by mistake




Bookmarks