avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Input Capture on Mega128


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Input Capture on Mega128
Date: Wed, 31 Dec 2003 15:53:54 +0100 (MET)

As Christian Ludlam <address@hidden> wrote:

>I don't think you can, or need to - the idea is that TCNT3 gets
>copied into ICP3, then on your next event you do |TCNT3 - ICP3| to
>get the elapsed time.

And remember, unless there is more than one timer roll over the top,
you normally don't need to take extra precautions to implement the
|...| operation.  Standard 16-bit unsigned arithmetic will do the
right thing for you.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]