I'm using ATmega32. This two timers looks very similar. What is a difference between them? When should I use Timer0, and when Timer2?
Timer2 is async timer. It means it can count when sleeping. But it's tricky to setup it when external clock is required. When external clock source is to be used a few pulses to setup it correctly is needed. I.e. it limits timer2 counter to be used as random pulse counter.