MAKECourse
  • Home
  • About
  • Course Materials
    • Software
    • Course Kits
    • TA hours
  • Videos
    • Intro to Programming Videos
    • Advanced Topics >
      • DAC and ADC Tutorial
      • SD Card Data Logging
      • DC Motor Control
  • Schedule
    • Syllabus
  • Student Projects
    • Awesome Prizes
    • Fall 2020 Projects
    • Fall 2016 Awesome Prize Winners
    • Fall 2016 Projects
    • Spring 2016 Awesome Prize Winners
    • Spring 2016 Projects
    • Fall 2015 Awesome Prize Winners
    • Fall 2015 Projects
    • Spring 2015 Awesome Prize Winners
    • Spring 2015 Projects
    • Fall 2014 Projects
    • Spring 2014 Projects

Week 13: Segment 1: USe of the watchdog timer on the Arduino

This segment focuses on the use of the Arduino 'Watchdog Timer'. This timer is an independently running counter, which has its own 128kHz clock. This timer can be used to reset the Arduino every time it times out (lapses). Time-out times can be set from 16 ms to 8 s. The Watchdog can be reset to zero from the main loop, i.e. a situation can be created where the Watchdog only triggers an interrupt once the main loop stops running properly and the Watchdog is not set back to zero anymore. In this case it times out and a system reset is generated, which restarts the sketch in the main loop. This is a useful feature for making sure that the Arduino keeps running, even if something goes wrong occasionally.

Goals:

  • Understand how the Watchdog Timer works.
  • Learn to use the Watchdog.

Materials for this segment:
  • Watch the video on the right 
  • Arduino sketch featured in the video (see link below video).
  • The ATmega328p data sheet. Look at Chapter 10, where the Watchdog is discussed and its register is explained.

Main Arduino sketch used in the tutorial:
t18_watchdog_tutorial.zip
File Size: 1 kb
File Type: zip
Download File

[Home] [Course Materials] [Syllabus] [Student Projects] [Contact]
Powered by Create your own unique website with customizable templates.