LVP is off, the chip still works 100% except portb.7 (maybe portb.6 too, I don't have anything on that pin) I have an LED on portb.7, which works fine until I add the above code. The programmer is a PICFlash2. It does not recognize the chip at all, won't allow me to erase, read, write, etc... I really need to use the capture module, but I can't keep bricking these chips. Not sure how to proceed from here.

Thanks!