At 05:01 PM 4/29/05 +0200, Richard Duits wrote: >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; > > > > ?? Methinks we are answering different questions. That doesn't measure the interrupt response. That measures the pulse. Likewise toggling an external pin doesn't measure the pulse it measures the interrupt response. I think the original question was how to measure the interrupt response characteristics. 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/
Message
Re: [lpc2000] Re: Time between ext interrupt calls
2005-04-29 by Robert Adsett
Attachments
- No local attachments were found for this message.