I've got a strange problem with a PIC. When I set a pin high, say PORTB.7, then try to bring it low after a second or two, the pin will stay high. This is the first time I've seen this after a few years of using PICs.
This happens with PORTA and B. Maybe the others. The strange part is that the pins will work fine for a while, then stay high. This PIC was working ok for a few months, now this.
I've placed the PIC in a basic circuit to test it. (The same basic circuit I've been using for years)
Here's the code I'm testing with. Has anyone ever had this happen?
Code:mainloop: High PORTB.7 ' Turn on LED connected to PORTB.7 Pause 1000 ' Delay for one second Low PORTB.7 ' Turn off LED connected to PORTB.7 Pause 1000 ' Delay for one second Goto mainloop ' Go back to loop and blink LED forever End ' PORTB.7 stays high. ' If I re-program it a few times, it comes back for a while.
Bookmarks