View Single Post
Old 04-28-2009, 11:33 PM   #1075 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,551

Michael's Electric Beetle - '71 Superbeetle 500000
Thanks: 370
Thanked 296 Times in 187 Posts
Hey Steve! I didn't feel like you were being critical. In fact, I finally got on the ball today and added the watchdog timer to the program to avoid the hanging u-controller. Thank you for the awesome suggestion. Now, if there is some strange thing that makes the micro-controller freeze up, in a half a second the watchdog timer times out and restarts the program. The human will notice that there is a sudden loss of power, and they will have to take their foot off the gas and then just go right back to driving. It shouldn't be a problem, as I've never had the microcontroller hang, but it must happen enough for people to invent a watchdog!

Thanks again, Steve! I haven't been wanting to wade through the documentation to understand how to do the watchdog until now. It turned out to only be 2 new lines of code, but it was like 4 hours of reading and debugging! haha! It's now tested and working in real life! One of the hard things was the fact that the stupid simulator on the computer doesn't restart when the simulated watchdog times out. Makes me mad! I would take that simulated watchdog to the pound.
__________________
When I die, I would like to go peacefully, in my sleep, like my grandfather did. Not screaming and yelling like the passenger in his car.
  Reply With Quote