#include <16F84.H> // I am using this PIC // high speed xtal, no watchdog, no code protect, and use power up timer #fuses HS,NOWDT,NOPROTECT,PUT // tell compiler clock is 10MHz. This is required for DELAY_MS() // and for serial I/O, all of which use software delay loops. #use DELAY(clock=10000000) // declare that we'll manually establish the data direction of // each I/O pin on port B. #use fast_io(B) #define IRX_B_TRIS 0b00110000 // setup directions // make a def for easy reference to the right pin #define RED_LED PIN_B2 // (output) Red LED (low true) // Macros to simplify I/O operations #define RED_LED_ON output_low(RED_LED) #define RED_LED_OFF output_high(RED_LED) // blink the LED on for 'on' ms, then off for 'off' ms 'x' times void blink(int on, int off, int x) { int i; for (i=0; i