I haven't worked with that processor but I must be a pice of cake ...
You can read the sensor in an idle loop...
#define output PORTP0.1 // define the ADXL 202 output
void read_sensor ( unsigned long *x, unsigned long *y )
{
while ( output );
while ( !output );
while ( output ) x+=1;
while ( !output ) y+=1;
}
unsigned long x,y;
read_sensor (x,y);
printf("\r\nFrequency is: %f",(float)1/(x+y));
printf("\r\nPeriod High: %lu",x);
printf("\r\nPeriod Low: %lu",y);
Best regards
Lasse Madsen
-----Original Message-----
From: dasbento@... [mailto:dasbento@...]
Sent: 4. oktober 2004 13:34
To: lpc2000@yahoogroups.com
Subject: [lpc2000] code for lpc2129 to read sensors
Hello,
I'm working with the lpc2129 to read and to process data of inertial
sensors. By chance anybody already developed some code, for example,
to read the accelerometer ADXL202E and the gyro ADXRS300??
Best regards
_________________________________________________________
CEAC Cursos de formação profissional - peça informações aqui.:
http://ceac.online.pt/
Yahoo! Groups LinksMessage
RE: [lpc2000] code for lpc2129 to read sensors
2004-10-04 by Lasse Madsen
Attachments
- No local attachments were found for this message.