AVR Timer2 asynchronous mode
We have almost gone through main modes of AVR timers. It is impossible to review them all in more detail as there are lots of unique uses and cases. Anyway we will get back to them in future, as lots of routines are usually based on timer operations. We haven’t touched Timer/Counter2, which is another 8-bit timer of Atmega328. This is very similar to Timer0 with all pretty same features, including CTC, fast PWM and correct phase PWM modes. If you can run these modes in Timer0 then this will be easy doing on Timer2. The only difference is the naming of registers. So let’s leave this behind and get to something new and untouched. As I mentioned before, each timer has something unique, making them useful on special occasions. So this one isn’t an exception. It has a particular asynchronous timing mode which can be set to count events from an external clock source or be clocked with 32.768kHz crystal.