The \"watchdog timer\" is a thing that allows the microcontroller to return to the system power-on state in unexpected situations (such as the program falling into an infinite loop) to ensure that the system restarts once when there is a problem. Just like when we use a computer, if it freezes, you press the reset button to restart the computer once, and the watchdog is responsible for this. It is a function added to the 52 microcontroller. In the past, the microcontrollers of the Intel 8031, ..., and AT89C51 era did not have a \"watchdog\" function inside, and we needed to expand the watchdog chip, such as X5045. Many people do not understand how to use it when they first come into contact with it, and the books are also vague, deliberately making it very complicated and mysterious (this may be a common problem for writers nowadays, for fear that others will think they are not good enough if they write it simply). In fact, to put it more clearly: the \"watchdog\" is a counter. Since the number of bits is limited, the value that a counter can hold is limited (for example, an 8-bit counter can hold a maximum of 256 numbers, and a 16-bit counter can hold a maximum of 65536 numbers). From the moment the \"watchdog\" is turned on, it begins to count machine cycles continuously. When one machine cycle is counted, the counter increases by 1. When the counter can no longer hold the number (the term is called overflow), a reset signal is generated to restart the system.
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore