In this video, we will talk about such a concept as the Watchdog timer or Watchdog. What is Watchdog and how to work with Watchdog on AVR microcontrollers.
Using the example of working with the ATtiny13 microcontroller, we will analyze three Watchdog modes of operation: initialization of the microcontroller reset (Reset), interrupt call (Interrupt) and a combined interrupt call and microcontroller reset mode.
Let's consider setting the Watchdog operating mode, setting the delay time for its timer to work. And with the example of LEDs, I will demonstrate three possible modes of operation of the Watchdog timer and how they can be used in practice.
Let's also talk about the differences in the Watchdog register on various microcontrollers: ATtiny13, ATtiny25 / 45/85, ATtiny2313, ATmega8 and ATmega328.
Below are the sketches from the video in two versions of each (C style and Arduino style):
Watchdog Reset (C) https://drive.google.com/file/d/1Pr9...
Watchdog Reset (Arduino) https://drive.google.com/file/d/1LaIj...
Watchdog Interrupt (C) https://drive.google.com/file/d/1t4MX...
Watchdog Interrupt (Arduino) https://drive.google.com/file/d/1xVGi...
Watchdog Interrupt + Reset (C) https://drive.google.com/file/d/17HA2...
Watchdog Interrupt + Reset (Arduino) https://drive.google.com/file/d/18gtN...
0:00 What is Watchdog?
1:35 Watchdog setup
5:06 Watchdog and Reset
11:04 Watchdog and Interruption
14:50 Watchdog and Interrupt + Reset