Module 5 - Timer
1. Introduction to AVR Timers
1.1. Overview The ATmega328P is a widely popular 8-bit microcontroller, serving as the "brain" fo...
2. Operating Modes
2.1. Normal Mode In Normal Mode, the timer acts as a simple up-counter. It starts from 0 and inc...
3. Timer0
3.1. TCNT0 (Timer/Counter 0 Register) The TCNT0 register is the core component of the 8-bit TIME...
4. Timer1
4.1. TCNT1 (Timer/Counter Register) TCNT1 is functionally the same as TCNT0, serving as the core...
5. Delay Using Timers
5.1. Delay Calculation in Normal Mode In Normal Mode, the timer always counts up to its maximum v...
6. Der Code
6.1. Code Example 1 (Timer0) This code toggles PD5 every 0.5s. The delay_timer0 subroutine uses ...