ADXL312 in FIFO mode


I am trying to read a single axis from the ADXL312, a 3-axis device. So, assuming I am interested in the x-axis, I can read from the DATAX0 and DATAX1 registers and combine them in the host micro (v850 FG3). This works fine, but now I want to increase the Output Data rate using the BW_DATA rate, and read out from the FIFO every program loop, to perform some filtering/averaging.

However, I can't seem to get this working correctly.

The first value from the FIFO read seems to be correct, the subsequent values seem to be mainly zero, ie nothing like the first correct value, even though the device is not moving.


The SPI clock frequency is about 0.3MHz

To set up the FIFO mode, I have written: 0x60 to FIFO_CTL register, even though I am not using the wetermrark interrupt.

To set up the Output Data rate, I have written: 0x0E to BW_RATE register

When not in FIFO mode, if you 6 bytes in Multi-byte from DATAX0, you will read from DATAX0, DATAX1, DATAY0, DATAY1, DATAZ0 and DATAZ1 in turn. What happens in FIFO mode? For example, if you are using 16 values from FIFO, if you continually read from DATAX0, will you read all the DATAY and DATAZ FIFO values too?

Also, in FIFO mode, if the output data rate is 1600Hz, does that mean that within the device, samples are being taken from the accelerometer(s) and placed into the FIFO buffer at intervals of 0.625 msec?

Any help or clarification gratefully received


Parents Reply Children
No Data