標(biāo)題: 關(guān)于mega328p watchdog [打印本頁] 作者: krommel 時間: 2015-4-11 11:43 標(biāo)題: 關(guān)于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: