It is my belief that the Arduino language really needs some docs on how the timers work: what functions use what timers? what will break when a timer is repurposed etc.
I don't really feel competent to do this, but many people have written libraries based on the timers. There are so many things that can ONLY be done by using timers and AVR code, that I feel it's time to give users a place to begin using these valuable tools, and also a way into really understanding the source code. Plus I want to know for selfish reasons, so I can understand the source code, and begin playing with timers and interrupts myself.
If anyone would like to take a shot at writing some docs / and or a tutorial on timers vis a vis Arduino , I will try and compile and edit it and get it in the docs somewhere, and help to extend it and maintain it.
Where the docs go when they are written remains another issue, but we'll find a place.
This was posted in these forums on the 25th, you can find the post by typing "timers" into the search box at the top right corner of the Arduino Forums page: Secrets of Arduino PWM
It focuses mainly on timers as related to PWM, but most of the information is there.
Thanks macegr - this is great piece. I'll see if the author minds if we reformat for the Arduino docs wiki. Not much I saw on the Arduino source code but I just scanned it. I'm sure writing it up will get me most of the way there.
Very useful. In my ideal world I think a lot of this material would be in a more accessible place.
I propose starting to add sections on the reference page that are "below the fold". This is, after the footer (don't know if the footer would let use do that but the footer boilderplate could be some kind of shtml include instead. Maybe a heavy rule could be added to reinforce where the "standard" docs are ending.
Material "below the fold" could include geeky details like are listed on the resources page, how long the function takes to execute, other geeky caveats about which functions the function is likely to interfere with etc. Plus some advanced examples. Users would never need to see the material unless they wanted to scroll down. And beginning students could be instructed to generally ignore the extra notes.
There have been several other requests on this forum topic for that kind of detailed information, that has been heretofore unavailable, unless one really wanted to dig through the source code.