//
// Concise demo of the EXT Interrupt Pin on the PIC16F876
// For SP.710, Spring 2001
// maxdavis(at)mit.edu
//

#include <16f876.h>
#fuses nowdt, hs, noprotect, put, brownout, nolvp 
#use delay(clock=20000000)
#define LED PIN_C5

#int_ext
void ext_interrupt_subroutine() {
  output_high(LED);
  delay_ms(150);
  output_low(LED);
}

void main() {
  enable_interrupts(INT_EXT);
  ext_int_edge(L_TO_H);         
  enable_interrupts(GLOBAL);

  while(1) { }

}








