if your putting the pic into a sleep mode for what ever reason you guess you could connect the input signal to an input that can be programmed to fire off an Interrupt. the start of this pulse should force the IRQ code to jump rite to the reading loop etc... in other words, either program the input line to trig an IRQ when it goes into sleep mode and then shut it off on the first trigger or use a different input and tie them together. etc..