Hi,
I think the pin stop working because you enable the oscillator for TMR1, the oscillator uses RB6 and RB7 so they can't then be used as I/O.
I see you're using internal oscillator, are you using internal MCLR as well by any chance?
Looking around there seems to be an issue with using internal oscillator and internal MCLR and initially setting PGD/PGC pins as outputs - or something like that. In that case the device apparently can't enter programming mode without the device programmer applying Vpp before Vdd which apparently not all device programmers can do - again, or something like that. See this for example.
Not saying this IS the case in your case but it does "smell" like it to me.
/Henrik.




Bookmarks