AVR Timer Interrupts Calculator

Aplikácie

Timer is calculated in CTC mode. Select requested frequency, MCU and timer. Click Calculate. Copy result into the clipboard. Paste code into Arduino IDE.

Last error: Unable to calculate valid OCR value. {{last_ocr}}>{{timer.maxvalue}}
{{warning}}

Microcontrollers

ATmega328P

Arduino Uno, Arduino Pro Mini.

ATmega48A, ATmega48PA, ATmega88A, ATmega88PA, ATmega168A, ATmega168PA, ATmega328.

  • Timer0 - 8-bit
  • Timer1 - 16-bit
  • Timer2 - 8-bit

ATmega2560

Arduino Mega 2560.

ATmega640, ATmega1280, ATmega1281, ATmega2561.

  • Timer0 - 8-bit
  • Timer1 - 16-bit
  • Timer2 - 8-bit
  • Timer3 - 16-bit
  • Timer4 - 16-bit
  • Timer5 - 16-bit

ATtiny85

ATtiny25, ATtiny45.

  • Timer0 - 8-bit
  • Timer1 - 8-bit

Changelog

  • v. 7 - ATmega2560
  • v. 6 - ATtiny85
  • v. 5 - Redesign
  • v. 4 - CTC on Timer0 and Timer2 fixed
  • v. 3 - More ATmega328P microcontrollers + sorting
  • v. 2 - CTC on Timer0 and Timer1 fixed
  • v. 1 - Initial version (ATmega328P)

Index Prescaler OCR Freq Diff
{{ $index}} {{ x.prescaler }} {{ x.ocr }} {{ x.freq }} {{ x.dif }}
best_index: {{best_index}}

mc: {{microcontroller | json}}

timer: {{timer | json}}

debug_list: {{debug_list | json}}