I have used a timer in my code (16 bit timer 1 I believe), but I have pretty much just copied it from another code example I found on here so I dont actually understand how to use them myself. I know that I have to modify certain registers to set Wave Generation Modes, clock prescaling etc such as:
TCCR1A TCCR1B TCCR1C TIMSK1 TIFR1 OCR1A OCR1B
but if I was to try to use a timer on my own on the duemilanove I very much doubt id be able to.
Does anyone have a good tutorial or able to explain the use of timers easily? There doesnt seem to be much info around. Can anyone tell me briefly what each of these registers are used for? I think that OCR1A and OCR1B are used to compare the counter to but I dont understand why I need 2 of them and not just one