As PBP ONLY supports 8 bit series 10F, 12F, .... 18F we know you are not using it, so looking at your code would be of value to very few. Evidently something in there is draining that battery through your pull up, maybe an port of your PIC backfeeding. You are welcome to browse this forum in your search, it is however not the place for 24F questions as 24F are UNSUPPORTED by PBP.