15.8. Watchdog Timerถ้า the watchdog timer ไม่ถูกต้องการใช้ใน the application, the module ควรถูก turned off. ถ้า the watchdog timer ถูก enabled, มันจะถูก enabled ใน sleep modes ทั้งหมดและดังนั้นจึงกินพลังงานเสมอ. ใน the deeper(ลึกๆนานๆ) sleep modes, นี้จะมีส่วนร่วมอย่างมากต่อ the total current consumption.
โปรดดู Watchdog System Reset เพื่อดูรายละเอียดเกี่ยวกับการกำหนดค่า the watchdog timer.
15.8.1. Features• สัญญานนาฬิกาจาก separate(ที่แยกต่างหาก) On-chip Oscillator
• สามโหมดการทำงาน :
– Interrupt
– System Reset
– Interrupt and System Reset
• Time-out period ที่สามารถเลือกได้จาก 16ms ถึง 8s
• Hardware fuse Watchdog เป็นไปได้ที่จะออนเสมอ (WDTON) สำหรับ fail-safe mode
15.8.2. OverviewThe device มี an Enhanced Watchdog Timer (WDT). The WDT คือ a timer ที่นับรอบของ a separate(ที่แยกต่างหาก) on-chip 128kHz oscillator. The WDT ให้เกิด an interrupt หรือ a system reset เมื่อการนับถึงค่าการหมดเวลาที่กำหนด. ในโหมดการทำงานปกติ, มันมีความจำเป็นที่ระบบจะใช้คำสั่ง the Watchdog Timer Reset (WDR) เพื่อรีสตาร์ท the counter ก่อนที่จะถึง the time-out value . ถ้า the system ไม่เริ่มต้นนับ the counter ใหม่, an interrupt หรือ system reset ก็จะถูกปล่อยออกมา.

ปล. เดี๋ยวจะลองทำตัวอย่าง watchdog time ดู แต่ต้องให้อธิบายแต่ละบิทเสร็ฐก่อนเพื่อความเข้าใจบิทและ library ตอนนี้ก็ลองเสริจกูเกิ้ลด้วย avr watchdog timer เพื่อหาตัวอย่างดูไปพรางๆก่อนนะ
