Easy start to use timer (real time counter - RTC) and watchdog for Arduino Nano Every (ATMEGA4809).
Some existing example code regarding timer and watchdog for Arduino Uno does not work for Arudino Nano Every. Therefore you will find here some code especially for Arduino Nano Every.
Example code see on github. More informations about register settings see in datasheet of ATMEGA 4809.
Purposereal time counter - RTC
The RTC can be used to create a clock or in general to be used as a timer.
watchdog
And the watchdog to make your system more robust against unexpected events. It brings back your system into a stable state when an internal bit error occurred from a glitch outside for example (atmospheric noise).
Hint: It also works when there is a software error (e.g. overflow) and makes your system stable - but it is recommended to find and fix the software error. The watchdog can be used to find out such a behaviour.
Comments