AVR Timer 0 Calculator

Values to setup Atmega Timer for a given Period (CTC Mode).

Set a "Timer/Counter Compare Match A" interrupt.
The interrupt routine will be called every "Period" uS.

Depending on the AVR model you should use OCRx TCCRx or OCRxA TCCRxA TCCRxB.

Select Timer, Fosc and Period you want to use.
Then press "Calculate":


Timer:





Fosc (MHz):

Period (us):





OCRx (Value):
TCCRx (Value):


OCRxA (Value):
TCCRxA (WGM):
TCCRxB (CS):