Quote Originally Posted by divaker View Post
But do you mean that the code is really working for you on the chip as expected?
Then what could be the problem with mine?
Is it something to do with my power supply?
As soon as I make the first press of the button (RB7), the chip seems to reset. (Of course the WDT was off!)
Why don't you post a schematic of EXACTLY what you've got...

And the code that Joe posted is different than the code that you posted...so does it work?