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.

How to implement watch dog timer in AT89S51?

Status
Not open for further replies.

ravi_p

Member level 1
Joined
Jun 29, 2004
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
337
watch dog Timer

Hi
I am using AT89S51 can any one tell how to implement watch dog timer with some code example.
 

watch dog Timer

I think WDT should be implemented in HW, example: X25045
 

Re: watch dog Timer

Hi
I am using AT89S51 can any one tell how to implement watch dog timer with some code example.

What language, what compiler?

Mr.Cube
 

Re: watch dog Timer

Hi
I am using assambly and Keil software
 

watch dog Timer

Salam,

WDT is consist of

[1] 14-Bit Counter (Count from 0 ---> 3FFF )
[2] WDTRST SFR (Write only)

The WDT is disabled by defult
To Start the WDT Use two instructions

WDTRST=0x1e;
WDTRST=0xe1;

The WDT start to count from 0 to 3FFF (16383)
When The WDT overflow it will drive RST pin High for time equal to 98*Tosc (Where Tosc=1\Fosc)

The WDT will increment every one machine cycle while the oscillator is running.

Example
----------
If you are connecting your 8051 to 12 MHZ crystal.

Then WDT will increment every 1uS
WDT overflow after 16384uS increments and reset your microcontroller.

To avoid WDT reset your micro, you must put the following instructions in the begining of your periodically calling functions.

WDTRST=0x1e;
WDTRST=0xe1;

Have Fun
Bye
 

Re: watch dog Timer

Read this articles:
"Introduction to Watchdog Timers" by Michael Barr
**broken link removed**
"Watchdog Timers" by Niall Murphy
**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top