Saturday, October 23, 2010

Othee visual description watchdog works



Micro-chip microprocessor in the computer system, due to the work of SCM is often subject to interference from external electromagnetic fields, causing the program to run fly, and fall into an infinite loop, the program's normal operation is interrupted by a microprocessor controlled system can not continue宸ヤ綔 will causing the whole system of fall into stagnation, the consequences of occurrence of unpredictable, so out of right SCM Yunxing state real-time monitoring of the consideration, Bian produce the one kind of microcontroller dedicated to monitoring the running state of the chip, commonly known as "see Door Dog "(WatchDog)

Watchdog circuit applications, so that SCM can achieve in the absence of state for work, its working principle is: a watchdog chip and microcontroller I / O pins connected to the I / O pin is programmed to its regular Watchdog to go into this pin high (or low), this procedure statement is distributed to other control statements on the middle of the SCM, SCM as soon as due to interference proceedings but after running into a flying a program segment into the dead cycle state, write the watchdog pin can not be performed the procedure, this time, the watchdog circuit will be sent as a signal without MCU will reset pin in it and connected to Microcontroller The pin sends a reset signal to MCU reset occurs, the program from the program memory of the starting position started, this will automatically reset to achieve a single chip.

Watchdog, called WatchDog Timer, a timer circuit, generally have an input, called feed the dog (kicking the dog or service the dog), an output to the MCU's RST terminal, MCU normal work time, every side time to output a signal to feed the dog side, a WDT reset, if not feed the dog more than the stipulated time, (usually when Runaway), WDT time over, went back to give a reset signal to MCU, MCU is reset. MCU to prevent crashes. watchdog role is to prevent the occurrence of infinite loop processes, or procedures running fly.

How it works: After running in the system also starts the watchdog counter, watchdog starts counting automatically, if not to a certain amount of time to clear the watchdog, then the watchdog counter will overflow causing gatekeeper dog interrupted, causing a system reset. Therefore, use the chips watchdog should pay attention to clear the watchdog.

Is to use a hardware watchdog timer to monitor the operation of the main program that is running in the main program, we want time to time before the timer reset if there is an infinite loop, or PC pointer can not come back. So time after time to make MCU reset. Commonly used such as WDT chip MAX813, 5045, IMP 813 and so on, the price 4 to 10 per month.

Software Watchdog technical principles and the same, just the method is to use the software to achieve, we were still 51 speaking, we know that there are two in 51 single-chip timers, we can use two timer monitor the operation of the main program. We can set a certain time T0 time, when the timer interrupt generated when a variable assignment, and this variable in the main program already have a running start of the initial value, where we have to set the timing value is smaller in the main program running time, so that the tail of the main program to judge the value of the variable, if the value of the expected changes have taken place, it shows T0 interrupt normal, if not changed then make the program reset. For T1 we use to monitor the operation of the main program, we set a certain time to time T1, in the main program for its reduction, if not some time in their reset, T1 of the timer interrupt will cause the MCU reset. Here the timing of time T1 is greater than the main program to set the running time, to the main program and leave enough room in the margin. The T1 interrupt normal or not we then T0 timer interrupt subroutine to monitor. That's enough becomes a cycle, T0 monitor T1, T1 to monitor the main program, main program again monitor the T0, to ensure the stable operation of the system.







相关链接:



Enjoy it: lots to talk about topics for undying domain



3DS MAX of magical engraving



Compilation of various source - alarm



QT to WMV



Semiconductor India vied with New Deal



SWF TO MOV



FLV to iPhone



Sybase raise money for love during the full Sichuan



c # and class DIFFERENCES in the structure



Getting Started with Corel Draw 10 (4) hands to create vector graphics (1)



Inventory And Barcoding introduction



FOR you Icons



Complete DVD quiz



resolving quot corrupt registry quot error



Cisco's Chambers With 16 Billion U.S. Dollars That "partnership"



No comments:

Post a Comment