I am using the following code to detect when a pulse arrives at a pin:
Wt:
IF fin = 0 then Wt
It works well, since the pulse is only a couple of micro seconds long and I am running at 4 MHz, but I also need the routine to timeout after about half a second. I tried using PulsIn, but it does not detect the pulse. I though may be using TMR0 and an interrupt coded in assembler could make this loop exit, but my expertise in assembler are very (extremely) limited.
Do any of you have an idea?
Bookmarks