What is a Timer?
Author: Robert Perkel, Applications Engineer; Ross Satchell, Applications Engineer. Microchip Technology Inc. |
Timers are a fundamental peripheral in microcontrollers. It should come as no surprise that there are a lot of timers, each with their own strengths. When selecting a timer, often there is no wrong answer – as it depends on the available requirements and available device resources. This document covers the timers currently available in AVR® microcontrollers. A companion document covers the timers available in PIC® microcontrollers.
For the purposes of this document, a hardware timer is a peripheral that counts clock pulses to perform a specific action,from periodic interrupts to waveform generators. In many cases, it’s possible to make a specialized timer behave like an ordinary timer or counter with some extra software.