Since this is interrupt driven for the capture, then the serial
routine is killing the counters by missing them. I would move the
currTC = T0CR2 into the IRQ routien and make it a volatile global so
that you can read it and clear it off. I would also do the prevTC =
currTC in the interrupt routine as well.
regards,
Charles
--- In lpc2000@yahoogroups.com, "jase_ko" <jase.ko@...> wrote:
>
> Here is the IRQ code for the timer.
> We dont use interrupts for the capture pin. (We tried once, but it
> then stuffed up IRQ serial comms).
> When the pin fires it updates the capture pin counter and then we
> read this at our leisure.
>
> I had a look at the errata. The only thing it mentions about a
> capture pin is for pin P0.21. We use P0.16, CAP0.2
>
>
> void IRQTickTimer() __attribute__ ((interrupt));
> void IRQTickTimer()
> {
> T0IR = 1; // Clear interrupt flag
> VICVectAddr = 0; // Acknowledge Interrupt
> }
>Message
Re: Capture pin inconsistencies
2006-02-15 by charlesgrenz
Attachments
- No local attachments were found for this message.