In life and embedded systems timing is everything. Give [Frank’s] web-based timer calculator a try. Set your system clock resolution (in hertz making sure you account for any system clock divider), select your timer resolution and prescaler, then calculate based on desired ticks, overflows, or real time. He’s built this with the AVR chips in mind but it should be handy for any family of microcontrollers.
Of course none of this is rocket science, but if you’re trying to use one timer for two differently synchronized events this can save you a lot of trial and error time.
This is one of those simple things that’s incredibly useful. Calculating timer constants by hand is a real pain – half the time you end up dividing something where you should have multiplied, or you forget to take into account the overflow, or something else. Stuff like this is really helpful.
Oh yeah, Mike. Nice catch. Thanks for the post.
Also useful, linked from Frank’s site, the Engbedded Atmel AVR® Fuse Calculator:
http://www.engbedded.com/cgi-bin/fcx.cgi
Yeah very usefull indeed.
Altough, I would be a bit nervous about precision. I’m used to PIC microcontroller and I have a spreadsheet that I update each time I use a new family. Every single time there is a new pre or post scaler with or without PLL etc…
But once you verified that it actually works with the device you use, it is indeed a very useful tool.
Nice !
JF
Hey thanks for the mention! This started as a Visual C# thing but I figured a web interface would be more cross-platform.
Dear Sir,
I click the buttons but nothing happen.
Kindly fix routines.
Bah! Embedded C solves all this with good functions and a smart compiler.
Great tool.
@Hackius – Having a smart compiler is no excuse for being lazy.
everything seems to work fine for me
i’m not actually familiar with javascript, so if any body see that i did anything wrong let me know.
i’m using firefox 3.5 with javascript enabled
@Bloom Berg
…you’re not just clicking the JPG above and hoping it works are you?
I’ve written a similar software some months ago, for the Microchip’s Picmicro. It generate also the code (in Ansi C):
http://www.settorezero.com/wordpress/software/pictimer/
I’m Italian but the software is also translated in English