If it is a very short Pulse (a few uS), you might miss it's arrival during the 1mS Pause statement.
If you can route your pulse into say RB0, then rather than polling the pin, you can poll the INTF bit (not knowing your PIC I'm using the registers from a 16F628 as an example). This bit will SET and stay SET when your pulse arrives. So if you blink and miss the pulse because you were doing something else, the Flag tells you it's happened.
Don't worry, the software doesn't actually need to vector to any Interrupt routine, once set up (eg INTEDG=1, INTE=1, GIE=0) you can just poll the INTF flag (rather than the pin) as per Al's example.
Don't forget, it's your job to reset the INTF flag ready for the next event.
Bookmarks