Page 1 of 1

Pic program stops running

Posted: Fri Dec 14, 2012 8:19 pm
by xeshai
I have started working with the pic18f452 and when I do just a single servo control or led blinking get an issue where the program stops running. It works fine if I give it a few minutes then hook the power up. It almost feels like something is overheating but nothing is hot. I was wondering if you have any idea? this is all in a while(1) loop and it runs for varying lengths of time which tells me it's not a software issue.
Thanks,
Brian

Re: Pic program stops running

Posted: Sun Dec 16, 2012 6:48 am
by ThePyroElectro
Hello,

Probably:
The only time I've experienced that was when there was a power supply issue. Adding a 1uF or 10uF capacitor between the pic power and ground always fixed it.

Also possible, but unlikely:
Alternatively if your watchdog timer or any of the protective circuitry is active (you would have had to enable it), an exception could be thrown and getting stuck in an ISR somewhere that you didn't declare.