At 04:05 PM 1/23/05 +0000, you wrote:
>void acel_cap_eixo_x(void){
> u32 tpu;
>
> if(IOPIN0 & ACEL_asc_x){ //verify if rising edge
> tpu=T1CR0;
>
>duty_x=(float)(ACEL_T2_x-ACEL_T1_x)/(float)(tpu-ACEL_T1_x));
I haven't gone through this in any sort of detail, but doing floating point
in an interrupt is at least questionable. At the very least you need to
check if your compiler supports it. BTW despite the casts the above will
be done in double precision.
Also, please trim those parts of the previous post you are not referring to.
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, IIIMessage
Re: [lpc2000] accurate pulse measurements
2005-01-23 by Robert Adsett
Attachments
- No local attachments were found for this message.