
Many µPs contain internal watchdog timers, and you may wonder why you need another stand-alone circuit. Unfortunately, more highly integrated functions have preset parameters that you may want to change. Also, internal watchdogs are generally a simple combination of a flip-flop and a timer. If the program does not start properly on the first try, the timer is of no use because the program never turns on the watchdog. This watchdog catches exactly this condition.
The design in Fig 1 allows you to set all parameters and fully control the reset of the µP. The circuit consists of two serially coupled one-shots in IC1. IC1A controls the reset pulse width using R1 and C1, and IC1B controls the distance between pulses using R3 and C3. The µP should apply a short negative pulse to the watchdog input at R4. If this signal is static long enough and enables IC1B to time out, the circuit returns a reset pulse. At power-up, the circuit activates reset for a longer time using R2 and C2, enabling the processor clock to stabilize. Pushing SW1 performs a manual reset. You can also disable the watchdog function by removing R5 if special testing is necessary, such as when you implement the WDPulse for the first time. In this mode, IC1A retriggers itself, disabling IC1B.
This design uses cheap, off-the-shelf components, is flexible, is reliable, and has moderate power consumption of approximately <2 mA. The one thing missing is a supply-voltage monitor. You can add one using an ordinary op amp or a simple IC, such as the MAX809. You can simply insert this IC between 5V and R3. (DI #1704)