Just a basic question… For arduino/avr/ATMega328 I find lots of examples using Timer1 (there's even a whole library for it) but rarely any that utilize Timer0 (or Timer2).
Now, I know that using any of these timers to control an ISR method will disable the use of PWM on it's associated pins, but is there a specific reason that people seem to stay away from Timer0? Is it used for something else internally that one should not mess with?
My current application is fine using Timer1, I'm just curious if I'm missing something about these other often neglected timers.
Best Answer
If the question is about a bare AVR microcontroller, then no, there is no constraint on using any of the timers.
millis()
,delay()
and all internal timekeeping in the Arduino libraries use this timer. Changing it's time constant will impact these operations.