how program watchdog DS1232 for 87C51?

Thread Starter

Irmutis

Joined May 24, 2009
17
Hi... I want to know how to right a program for watchdog DS1232 for microprocesor 87C51 i C language? And how to pick up a right timeout? Thanks.
 

Papabravo

Joined Feb 24, 2006
21,228
Good news -- there is no program to write. You ge three choices, connect TD to GND, leave it floating, or tie it to VCC. What could be simpler. Where did you get the quaint notion that you needed to write a program?
 

Thread Starter

Irmutis

Joined May 24, 2009
17
another question about WD... How to chose that timeout, from where I should know that timeout is not too short or not too long or it doesn't matter?
 

hgmjr

Joined Jan 28, 2005
9,027
One other feature that you will need to consider is the TOL pin. This pin controls the tolerance of the device to the voltage drop on its Vcc pin. If you tie the TOL pin to ground the threshold is 4.75V and if you tie the pin to Vcc the threshold is 4.5V. You should not leave this pin open.

hgmjr
 

Papabravo

Joined Feb 24, 2006
21,228
Selection of watchdog timeout interval depends on what you are doing. This watchdog device depends on what you are connecting to the input. If you use the ALE signal then you might as well pick the shortest timeout since if the ALE signal goes away you want to know as soon as possible. On the other hand if you use a port pin and you have a great deal of processing to do you might want to select the longer interval.

You need to remember that a Watchdog should never be kicked in an interrupt routine. It should be kicked at least once every time the program's main loop executes a certain mumber of tasks.
 
Top