simple code using watchdog timer to reset the microcontroller

Published: 13 April 2015
on channel: Ebrahim Ahmed
2,993
1

for other projects related to automotive industry :
   • Video  


generally speaking the watchdog timer aka (WDT) is used to
1-generate an interrupt
2-generat a reset
3-servicing an interrupt and then resets
and this occurs in situations like hanging or enters an infinite loop ..
WDT is a timer .. takes initial value .. and counts down to zero .. if it reaches zero .. it will reset the system .. but if you with your code reset the WDT .. then it wont ever reaches to zero .. then the system wont reset ..

these links will help you to get to know WDT better ..
1-http://www.embedded.com/electronics-b...
2-http://www.embedds.com/using-watchdog...
3- you can download the atmega328 datasheet .. it explains it very well .. actually most peripherals ..

#this simple projects .. what it does ..it turns on the led ..
what potentionmeter does .. to provide a delay before turning on the led ...
if the delay is larger than the watchdog timeout(the time the WDT take to reset the microcontroller) .. then the code resets and never reaches the line which makes the led on ..
if the delay is smaller than the watchdog timeout .. then it will reach the led and it will make it on ...
but note:: that both cases the WDT will keep to reset the mcu ..

*a playlist for other projects
   • AVR microcontroller projects  


On this page of the site you can watch the video online simple code using watchdog timer to reset the microcontroller with a duration of hours minute second in good quality, which was uploaded by the user Ebrahim Ahmed 13 April 2015, share the link with friends and acquaintances, this video has already been watched 2,993 times on youtube and it was liked by 1 viewers. Enjoy your viewing!