Analog Devices Accelerometer Utilities


Detailed Description

Functions for measuring acceleration using Analog Devices ADXL202.

\

Files

Data Structures

Defines

Typedefs

Functions


Define Documentation

#define ADXL_TIMERTICKS_MAX
 

Max ticks.

#define ADXL_CALIBRATION_INITIAL_VALUE
 

Uncalibrated EEPROM ADXL_CalibrationInfo_t settings.


Typedef Documentation

typedef uint16_t ADXL_TimerTicks_t
 

Timer ticks counter from ADXL202.

typedef int16_t ADXL_g_t
 

deci milli g. +10000dmg = +1g


Function Documentation

void ADXL_SetCalibrationInfo const ADXL_CalibrationInfo_t *const  info_p  ) 
 

Set new calibration info Use this function to set calibration info read from EEPROM

void ADXL_ResetMeasuredCalibrationInfo void   ) 
 

Resets calibration info.

Call this function before user start 360 degree +-1g calibration. Use ADXL_GetMeasuredCalibrationInfo to get calibration info when calibration is done. This resets the measured calibration info. When calibration is done ADXL_SetCalibrationInfo must be called for the new calibration to take affect. For example:

const ADXL_CalibrationInfo_t* ADXL_GetMeasuredCalibrationInfo void   ) 
 

Get measure calibration info from ADXL library. Call this when user has subjected the accelerotmeter to +-1g on both axis. ADXL_ResetMeasuredCalibrationInfo must be called before calibration is started.

Returns:
The measured calibration info. Store this to NV memory (EEPROM).

void ADXL_PowerOn void   ) 
 

Start measuring acceleration

See also:
ADXL_MeasurementAvailable

unsigned char ADXL_MeasurementAvailable void   ) 
 

Returns != 0 if measurement is available

ADXL_g_t ADXL_GetX void   ) 
 

Get X-Axis value

Returns:
X-axis g-force in deci-milli-g. +1g is output as +10000.
Note:
ADXL must have correct calibration info

ADXL_g_t ADXL_GetY void   ) 
 

Get Y-axis value

Returns:
X-axis g-force in deci-milli-g. +1g is output as +10000.
Note:
ADXL must have correct calibration info

void ADXL_PowerOff void   ) 
 

Stop measure and power down all resources (ADXL, Timer1, Analog Compartor)


Copyright 2002 Jörgen Birkler. For accelR8 Accelerometer on Mon Jan 19 21:43:20 2004 by Doxygen 1.3.5.