Re: LPC2138 timers
- From: "Peter Dickerson" <first{dot}surname@xxxxxxxxx>
- Date: Thu, 29 Jun 2006 16:05:54 GMT
"Frank van Eijkelenburg" <someone@xxxxxxxxxxxxxxxx> wrote in message
news:482ef$44a3f118$3e3aa7a5$13428@xxxxxxxxxxxxxxxxxxxx
I am using a capture pin in combination with a timer of the LPC2138controller.
Each time a rising/falling edge is detected the running timer value iscaptured
and stored in a CAP register. I am using this method to measure timingbetween
the edges and calculate the frequency of the signal (squarewave).a new
Each time I enter my interrupt service routine I reset the timer (to start
measurement). Is there a way to do this automatically, because now I havea
Surely that will introduce a error due to the interrupt latency. Shouldn't
you be subtracting the previous capture value leaving the time to free run?
small gap between the edge and the start point of measurement. I saw thatyou
can automatically reset the timer if a match value is reached, but couldnot
find this possibility for the capture pins.
You shouldn't need to reset the timer at all. You want it to keep going so
that the results are entiely based on hardware timing without and latency
issues (except to respond to the interrupt before the next capture is
expected).
Peter
.
- Follow-Ups:
- Re: LPC2138 timers
- From: Frank van Eijkelenburg
- Re: LPC2138 timers
- References:
- LPC2138 timers
- From: Frank van Eijkelenburg
- LPC2138 timers
- Prev by Date: Re: Wich 16-bit MCU?
- Next by Date: Re: LPC2138 timers
- Previous by thread: LPC2138 timers
- Next by thread: Re: LPC2138 timers
- Index(es):