What happens to timer counter after output compare?
2005-04-15 by arhodes19044
I am setting up a timer. I am trying to measure milliseconds. I have set the output compare on timer 1 (prescale of 1) to 16000. I get the interrupt triggered, and I am able to increment the millisecond counter. Does the timer's counter get reset to zero automatically and immediately? I suppose it does not. What do I do to force it to reset? Do I write zero to the counter? Doesn't the timer lose a few ticks in this process? I did not notice a setting to cause the timer to reset automatically when the outputcompare interrupt is triggered, but I would have thought one exists. -Tony