"No doubt you are aware that even though you set RB5 to an output, it powers up as an input and doesnot change to an output until the point in your code where you explicitly change it to an output." Yeah, I am aware of that. "My feeling on how this works (pure speculation here) is that once the ICD2 raises the /mclr line, it no longer matters what the lvp pin is doing. /mclr is at Vpp and rules the roost until it is dropped." The configuration word probably makes a difference as well. I found that if I am using the ICD2 and the LVP is on, I could not program the part using the ICD2. "Of course, if you do enable lvp and don't set RB5 to an output then you may encounter erratic behaviour after you finish programming - assuming your circuit allows RB5 to go high." If you enable it, you better be programming it using low voltage and that pin cannot be used for anything. Best regards, Fred -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads