I am trying to implement the "Ultra Low Power Wake Up" feature on a small PIC project. The idea is the chip will go to sleep, and then be woken up in the future by the ULPWU interrupt.  

The idea behind the ULPWU is that you connect a capacitor to this pin, charge it and put the chip to sleep. When configured, the ULPWU pin will slowly discharge the capacitor. Once the voltage on the cap falls to some value, the chip wakes up and possibly generates an interrupt.  
This [application note](http://ww1.microchip.com/downloads/en/AppNotes/00879D.pdf) (PDF) from Microship explains how the ULPWU is programmed and implemented. See Example 2 and Figure 2. I have carried this out but am stuck with a strange problem.  

When the chip goes to sleep, there is 5V being supplied by the ULWU pin (RA0). If I connect this pin to ground, the chip waked up and does what it is supposed to do.  

My question is, why is there 5V on this pin when it is supposed to be an input? If I have this pin connected to a charged capacitor, the capacitor never discharges (the 5V on the pin is keeping it charged).Thanks.