Yahoo Groups archive

Lpc2000

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

Message

Re: accurate pulse measurements

2005-01-25 by chazeltopman

--- In lpc2000@yahoogroups.com, dasbento@a... wrote:
> 	   T1IR |= TIR_CR0I;
> 	   T1IR |= TIR_CR1I;
> 	   T1IR |= TIR_CR2I;	
These three lines will turn off all the interrupts if more than one happens at the same time 
since it is oring a value onto itself and then writing it back.  If others are set they will be 
written back too.  You need to change the |= to just =.

> 	if(IOPIN0 & ACEL_asc_x){	//verify rising edge
You cannot read the iopin level while the iopin is assigned to the timer.  You must switch it 
to GPIO with PINSEL0 first, read it, then switch back.

Rob

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.