Actions
Task #3555
openTask #3553: ADXL345 testing
Software development and testing
Task #3555:
Software development and testing
Actions
Task #3553: ADXL345 testing
Added by Thomas Joseph 4 months ago. Updated 3 months ago.
Developed program for SPI communication
SPI mode 3
Clock/MOSI/CS correct
Tried devide id
MISO always Low
Options
Details of Project:
The project uses SPI communication between the SAM L21 microcontroller and the ADXL345 sensor.
The SPI module is initialized in Master mode.
The ADXL345 sensor works in SPI Mode 3 configuration.
A Chip Select (CS) pin is used to enable and disable sensor communication.
The ADXL345_Write() function writes data into sensor registers.
The ADXL345_Read_DeviceID() function reads the sensor Device ID register.
SPI transfer is performed using transmit and receive buffers.
The received data is printed through UART using printf().
The expected ADXL345 Device ID value is 0xE5.
Successful reading of the Device ID confirms proper SPI communication.
Test Conducted:
Oscillation angle: 30 degree
No of Oscillations: 10
Time taken for 10 oscillations: 1min 52 sec 100 milliseconds
Fan Running Speed: Full Speed
For Oscillation time: approximately 9 Seconds.
Source Code:
https://elpisit.sharepoint.com/:u:/s/EmbeddedFiles/IQCN3A2i8zGnQoPf5z1S9A7PAZ7j-FflDDZ-60VxTPa6MWU?e=mSQIlb