12.看门狗
代码说明:
说明: 看门狗定时器(WDT,Watch Dog Timer)是单片机的一个组成部分,它实际上是一个计数器,一般给看门狗一个数字,程序开始运行后看门狗开始计数。如果程序运行正常,过一段时间CPU应发出指令让看门狗置零,重新开始计数。如果看门狗增加到设定值就认为程序没有正常工作,强制整个系统复位。(Watch dog timer (WDT, watch dog timer) is a component of single chip microcomputer. It is actually a counter. Generally, it gives a number to the watch dog. After the program starts to run, the watch dog starts to count. If the program runs normally, after a period of time, the CPU shall issue an instruction to set the watchdog to zero and start counting again. If the watchdog increases to the set value, the program will not work normally, and the whole system will be forced to reset.)
下载说明:请别用迅雷下载,失败请重下,重下不扣分!