AVR看門狗使用范例即Reset程序詳解

    AVR看門狗 一個硬件單元 , 當程序由于某種原因跑“飛”了 , 它就Reset程序 。 就像小狗看門一樣 。
    //Watchdog iniTIalize
    // prescale: 2048K
    void watchdog_init(void)
 
    {
    WDR(); //this prevents a timout on enabling
    WDTCR = 0