STC MCU is an enhanced 51 MCU, fully compatible with MCS-51. It also adds new functions, such as adding two levels of interrupt priority, one more external interrupt, built-in EEPROM, hardware watchdog, and power-down mode. 512B memory and so on. Also supports ISP downloads, without a programmer, as long as a MAX232 and some inexpensive components can write programs, can be erased 100,000 times. Therefore, it is a very good use of the microcontroller. Here, a brief description of the use of its watchdog. Once the watchdog of the STC MCU is started, it cannot be stopped. The watchdog overflow time can be calculated using the STC MCU user manual. A simple example is as follows: #i nclude //STC MCU header file #define uint unsigned int #define uchar unsigned char Sbit led=P1^0; //======================================================== ================= // function name: void delay (uint us) // Function function: delay // entry parameter: the length of the us delay time // Export parameters: none //======================================================== ================= Void delay (uint us) { While(us--); } Main() { WDT_CONTR=0x3c; //Start the watchdog Led=1; //Light up the LED Delay(100); Led=0; Delay(100); //extinguish the LED While(1) { WDT_CONTR=0x3c; //Hold the dog. If this bit is masked, the watchdog will reset after overflow and the LED will blink. } } China manufacture for Popular Custom Vape Pen, high quality battery, quality e-liquid and food safty material. Prefilled Vape Newmax Electronics Co.,Limited , https://www.advvape.com