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: Christian Ludlam
Subject: Re: [avr-gcc-list] Input Capture on Mega128
Date: Wed, 31 Dec 2003 14:38:36 GMT
User-agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.03) POPstar/2.05

On 31 Dec Frank Van Hooft wrote:

> Does anybody know if it's possible to automatically clear the timer/counter
> register (TCNT3) upon receipt of an input capture event? 
> 
> I know it's possible to automatically clear the counter for an _output_
> capture event. But it  appears to me it's not possible for an input capture
> event. At the moment I'm clearing  the TCNT3 counter in my input capture
> interrupt service routine. Just wondering if anyone  knows of a way to
> clear it automatically.

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.

-- 
Christian Ludlam
address@hidden


reply via email to

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