标题: 关于mega328p watchdog [打印本页] 作者: krommel 时间: 2015-4-11 11:43 标题: 关于mega328p watchdog #include <avr/wdt.h>
const int ledPin = 13; // the number of the LED pin
Note that for newer devices (ATmega88 and newer, effectively any AVR that has the option to also generate interrupts), the watchdog timer remains active even after a system reset (except a power-on condition), using the fastest prescaler value (approximately 15 ms). It is therefore required to turn off the watchdog early during program startup, the datasheet recommends a sequence like the following: