This is an old revision of the document!
The ADuCM360_demo_adxl355_pmdz is an accelerometer demo project for the EVAL-ADICUP360 base board with the EVAL-ADXL355-PMDZ board, using the GNU ARM Eclipse Plug-ins in Eclipse environment.
This project is an example for how to use EVAL-ADICUP360 board in combination with the EVAL-ADXL355-PMDZ accelerometer PMOD board.
The ADuCM360_demo_adxl355_pmdz project uses the EVAL-ADXL355-PMDZ which has the ADXL355 3-axis MEMS accelerometer on board.
The application reads the X , Y , and Z acceleration registers. The acceleration in the 3 axis is displayed in [mG]. There is an internal temperature sensor in the ADXL355, which is read and out either in [C] or [codes], and an on board 12-bit ADC that can be used to convert an additional analog sensor input. This is set by changing the TEMP_ADC variable within the main.c file. (Value of [0] is degrees Celsius, and value [1] is ADC codes) The acceleration range can also be selected by setting the ADXL_SENSE variable with the main.c file. (Values of [2, 4, and 8 are acceptable] )
All the outputs are printed from the UART to the USER USB port and can be read on the PC using a serial terminal program, such as Putty or Tera Term.
For precision applications, each ADXL355 chip requires individual calibration which can be done by measuring and setting the definitions ACC_TEMP_BIAS and ACC_TEMP_SENSITIVITY parameters in the ADXL362.h file.
The temperature in degrees celsius, Treal , can be derived from the ADC readings Tadc using the predefined formula:
Treal = (Tadc + ACC_TEMP_BIAS)/(1 / ACC_TEMP_SENSITIVITY)
We recommend not opening the project directly, but rather import it into Eclipse and make a local copy in your Eclipse workspace.
To learn how to import the ADuCM360_demo_adxl355_pmdz project form the projects examples in the Git repository, please click on How to import existing projects from the GIT Repository.
The source code and include files of the ADuCM360_demo_pmodacl2 can be found on Github:
The necessary instructions on how to import ADuCM360_demo_adxl355_pmdz project in your workspace can be found in the section, Import a project into workspace.
After completion of the steps above the program will remain written into the system flash and it will run by default every time the board is powered up.
The ADuCM360_demo_adxl355_pmdz project use basic ARM Cortex-M C/C++ Project structure.
This project contains: system initialization part - disabling watchdog, setting system clock, enabling clock for peripheral; port configuration for SPI0, accelerometer sensor use; SPI read/write functions; sensor monitoring.
In the src and include folders you will find the source and header files related to pmodacl2 application. You can modify as you wanted those files. The Communication.c/h files contain SPI and UART specific data, meanwhile the ADXL362.c/h files contain the accelerometer data. Here are parameters you can configure:
#define TEMP_ADC 0
#define ACC_TEMP_BIAS (float)350 #define ACC_TEMP_SENSITIVITY (float)0.065
#define ADXL_SENSE 2
#define SCAN_SENSOR_TIME 500
#define ACT_VALUE 50 #define INACT_VALUE 50
#define ACT_TIMER 50 #define INACT_TIMER 50
The system folder contains system related files (try not to change these files):