simple code using watchdog timer to reset the microcontroller

Pubblicato il: 13 aprile 2015
sul canale di: 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  


In questa pagina del sito puoi guardare il video online simple code using watchdog timer to reset the microcontroller della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Ebrahim Ahmed 13 aprile 2015, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,993 volte e gli è piaciuto 1 spettatori. Buona visione!