Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] What happens to timer counter after output compare?

2005-04-15 by Mark Jordan

On 15 Apr 2005 at 11:27, arhodes19044 wrote:

> 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? 

	The timer resets IF it is in CTC mode.

> Do I write zero to the counter? Doesn't the timer lose a few ticks in 
> this process? 

	Just write "a few ticks" instead of zero to the counter.

> 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. 

	Look for the CTC mode.

	Mark Jordan

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.