On Wed, Feb 25, 2009 at 11:05:02AM -0500, David VanHorn wrote:
> :)
> 
> Interrupt latency.
> 
> I have an app on a Mega32L, running at 4 MHz.
> I'm trying to measure the widths of pulses that could be as short as 5uS.
> 
> The theory was to detect the first rising edge, and zero T1.
> Then on the second rising edge, grab the count from T1, which is
> running at CK/1

Use an input capture I/O bit and let the hardware take a snapshot of the
timer value when the edge is detected. Zero latency as long as it
doesn't occur faster than you can reset the input capture..

-- 
David Kelly N4HHE, dke...@hiwaay.net
========================================================================
Whom computers would destroy, they must first drive mad.


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to