intproga.asm - demo program for interrupts with PCLATH non-zero. This demo program must be run on a 16F87x PIC. The demo will not work on a 16x8x PIC, as these processors have only 2K memory and ignore PCLATH. These notes assume that a 16F877 is being used; pin numbers will need to be adjusted for other PICs. Set up the circuit as in Fig 1 of the March 2002 article, but using a 16F877. Connect the LED to RA0 (pin 2) as shown. Connect the flying lead to RB0 (pin 33). As supplied, intproga.asm has a "goto ISR" instruction at location 4 and is therefore incorrect code if an interrupt occurs while it is in the main loop. Assemble intproga.asm and load it into the PIC. The LED should start flashing. Cause an interrupt by touching the flying lead on RB0 to ground. The led will stop flashing, and the PIC will appear dead (actually it is looping at location H'0805'). Delete the goto ISR instruction at location 4, reassemble the program and reload the PIC. Repeat the experiment, and now the led will continue to flash when interrupts are caused.