Some high end applications require multiple or critical calculations to be done by the microcontroller. This may lead to cases when the controller enters intowrong or infinite loops. As a result of this, the system either hangs up or gets crashed. The solution to overcome these situations is to automatically reset the system whenever such a situation arises.The Watchdog Timer is a hardware or software generated timer interrupt which reboots/resets the system in the situations mentioned above. The watchdog timers are also used in cases when you intentionally require resetting the system without any physical interference.The AVR microcontroller has an in-built watchdog timer. This article explains the working of watchdog timer in ATmega16. The Watchdog Timer is a special timer which can be enabled in any section of the code and when enabled it ensures that a certain number of instructions execute within a pre-defined time frame. This time frame or the time delay can be configured/set using the registers of the watchdog timer.