The Timer1 of the AVR ATMEGA328 microcontroller is a 16 bits timer/counter that is much more versatile and complex then the 8-bits TIMER0. Timer1 contains one 16-bit input capture register and two 16-bit output compare registers. The input capture register is used for measuring pulse widths or capturing times, while output compare registers are used for producing frequencies or pulses from the timer/counter to an output pin on the microcontroller. TIMER0 is usually started, stopped, and reset, while TIMER1 is usually left running.

TIMER1 Registers

Timer/counter prescaler and mode selector

TIMER1 is still a binary up-counter whose count speed or timing intervals depend on the clock signal applied to its input. Timer/counter control register 1 (TCCR1), is actually composed of two registers, TCCR1A and TCCR1B. TCCR1A controls the compare modes and the pulse width modulation modes of TIMER1. TCCR1B controls the prescaler and input multiplexer and the input capture modes. TCCR1A and TCCR1B are 8 bits registers.