I want to monitor an input for a given period of time, let's say 5 minutes. If it stays high for 5 minutes I then want to turn on another input until the original is turned off.

Can someone help point me in the right direction.

I'm using a 18F6520 with a 4mhz crystal.

thank you,
Hylan