This is a simple javascript calculator I wrote to help me make timing calculations while working with the timers on AVR microcontrollers. The same calculations applies for all microcontrollers but the prescaler options only contain the ones possible on an AVR microcontroller (the configuration number is indicated in the brackets).
Javascript must be enabled on this page for the calculator to work. Choose what value you want to use as input by pressing the button beside the textbox(es) you want to use as the input. The output will be reflected in the other textboxes.
Source code can be viewed through your browser.
System Clock Frequency (Hz): | Calculate Using … | |
Timer Resolution: | ||
Prescaler: | ||
Total Timer Ticks: | ||
Overflow Count: | ||
Remainder Timer Ticks: | ||
Real Time (sec): | ||
New Freq (Hz): |
Thanks for visiting! If you appreciate my content, please consider making a donation to a charity. Thank you ~ Frank
search term: avrtimercalc
Great website, it is very helpful. Thank you.
Excellent website!! finished my final project!! thank you very much.
Thanks for you Calculator. Helps me a lot to find the right timer configurations 🙂
Thanks a lot for this helpfull calculator… If you are planning a german Version, I can translate for you… 😉
regards
Michael
Yeah I am going to sleep about now
Infinite thanks for making this indispensable. I use it all the time.
Thanks,
Zack
IIT Chicago, IL
This indispensable tool. Wow.
Oh great!! bookmarked 😀
hi..
where i can get c code of the same ? i am unable to find the source code for the same ? i want to make free running timer using AVR.
Thanks.
This is a Javascript tool, not microcontroller code. It is not meant to be “run”.
Good post. I absolutely love this site. Keep it up!
Frank
Many Thanks for this tool. This makes AVR Timer calculations *so* darn easy. I can play with the prescaler, and it shows the fractions in the calculations, which I like. 10/10
Ajay
Oh thank your vermuch,
sery great work. i luv the site.
it has help me a lot for my studium
Thanks for this useful calculation..
Can we have a Hz option in here? while it’s just a 1/time division i think it would do good in here.
Will look into it
EDIT: done
It would be great if there were more options on prescaler and timer resolution, as some AVR devices have prescaler 4 and 12bit registers and such. Great tool thx 🙂
You have a bug in your page, every time I am trying to calculate the frecuency or time, js shows me an errod saying the function is not defined.
A WordPress update or plug-in update broke the page, I just fixed it. Thanks for the heads up.
Good post. Thank you.
Hi, i ve tried Your calculator on win7 firefox 36.0 and it didnt work for me at all.
also in ie 11 do not work
I really appreciate that site
Why doesn’t it work? I really need this and it’s not working. Such a let down!!!
It did work before and I have used it often but now it doesnt work on chrome nor IE9
Thank you so much for this.
It is really of great help, it has simplified the work.
hi what i the default frequency of the Atmega 328
Feature request: Display time in milliseconds and/or microseconds.
I’m needing (and getting) pretty tiny numbers. 🙂
Currently, only five states allow controlling rent. We have listed some important feature that you will want to look out for.
There is no promise that every item will be fixed, but most contracts have provisions that would allow you to cancel
the offer if something really major is found.
Thank you for this tool, it has helped me a lot!
Thank you for this, I have been using this for a very long time now.
This is a really great calculator. It can be used with other micros as well. I have used it for ATmega, ATtiny, and PIC12. For PIC12 just divide the System Clock Frequency by 4.
Dziękuje za ten piękny kalkulator
Looks like this needs to be updated to the newer browsers like Chrome or Firefox.
Correction: Yes this app works well. You must enter all the parameters, Then press the button related to the value you want.
my ticks value is exceeding 16 bit timer reg value .For example in my case ticks value is 781249 >> 65536.In my code should i keep the ticks value as it is and add timer count variable set to 60 seconds??
Hi, at which register I write the values:
– Total Timer ticks
– Overflow Count
– Remainder Ticks
This microcontroller has other names: https://ww1.microchip.com/downloads/en/devicedoc/atmel-2549-8-bit-avr-microcontroller-atmega640-1280-1281-2560-2561_datasheet.pdf
we search the values for 20kHz and 25kHz while the Motorshields only can 25kHz
Kind Regards