how program watchdog DS1232 for 87C51?

Discussion in 'Embedded Systems and Microcontrollers' started by Irmutis, May 24, 2009.

  1. Irmutis

    Thread Starter Member

    May 24, 2009
    17
    0
    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.
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    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?
     
  3. Irmutis

    Thread Starter Member

    May 24, 2009
    17
    0
    I don't know, I just thougt that it is programable and that's all :D Thank you ;)
     
  4. Irmutis

    Thread Starter Member

    May 24, 2009
    17
    0
    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?
     
  5. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  6. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    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.
     
Loading...