Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is Watch Dog function in MCU?

Status
Not open for further replies.

rozerf

Member level 1
Member level 1
Joined
Apr 20, 2002
Messages
34
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
210
pic16f stops responding

As subject, and how to use it with no bug?

thx in adv
 

what is the function of watch dog in mcu

Hi,

Watchdog timer is used for pervent the mcu from fall in infinite loop.
When you setup the watchdog, it will reset your mcu in predefined time.
All you have is reset watchdog timer in your code every group of instructions

SphinX
 
simply dont use . i write programs and i ve never need it.
 

even better is external watchdog ... circuit with input from your mcu and reset output to your mcu .. your mcu shuld send pulses in predefined time ... if your mcu stops responding to program iow stop send pulses circuit will reset your mcu by hardware ;0))
 

Maxim Datasheet says...

Microcontrollers are often used in harsh environments where power supply transients, electromagnetic interference (EMI), and electrostatic discharge (ESD) are abundant. Program corruption caused by bus corruption and electromagnetic discharges can cause a microprocessor to execute erroneous instructions. In these environments, a watchdog timer is a useful peripheral that can help catch and reset a microcontroller that has gone "out of control."
 
when should clear the watch dog timer?

and how to avoid abnormal reset?
 

You should clear the watchdog before overflow of its timer occurs (for overflow period value check the mcu datasheet). For instance, PICs watchdog have an internal RC oscillator that is independent of the main clock source of the uC. Its timeout value can vary between 7 and 33 ms (from PIC 18F8720 datasheet). As this period is far larger than your instruction cycle period (assuming that you aren't using a very slow clock source) it gives you plenty of room for scattering watchdog reset intructions in your code.
Watchdog timer is a very usefull feature, specially when you are developing remote applications where you can't easily push the RESET button when the system locks... Just think about satellites :)

Regards
 

Hi,
in pic16 WDT is 8-bit counter where input is system MCU clock( you can divide MCU clock ), when overflow occur the RESET will be generate, you must clear WDT before overflow.However if you don't need WDT you can disable.
 

Pervent the mcu running in infinite loop.
Programer must clear it
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top