Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: Time between ext interrupt calls

2005-04-29 by Richard Duits

If you want to know when a falling or rising edge occurs the timer 
capture function copies to timer counter to the capture register when 
the edge is detected. If you use an interrupt to read the timer counter, 
you get the timer counter at the moment the timer counter is read and 
not the timer counter when the edge was detected. So when you read TC in 
the interrupt, the value is edge time + interrupt latency. If you read 
the capture register, it is always the edge time.

This works only for edge sensitive external interrupts and not for level 
sensitive or internal interrupts. You would also need to connect the 
external signal to a timer capture pin for this to work.


Richard.


Robert Adsett wrote:

> At 08:56 AM 4/29/05 +0200, Richard Duits wrote:
> >Hello Jase,
> >
> >I would suggest to use a capture pin on timer 0 or timer 1 to capture
> >the falling edge. This is more accurate because it eliminates the
> >interrupt lattency.
>
> Umm, how does
>
> interrupt_occurred_at = timer_value;
>
> have any less latency than
>
> portset = 0x20;
>
> ??
>
> Robert
>
> " 'Freedom' has no meaning of itself.  There are always 
> restrictions,   be
> they legal, genetic, or physical.  If you don't believe me, try to chew a
> radio signal. "  -- Kelvin Throop, III
> http://www.aeolusdevelopment.com/
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/lpc2000/
>        
>     * To unsubscribe from this group, send an email to:
>       lpc2000-unsubscribe@yahoogroups.com
>       <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>        
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

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.