2014-11-25 09:40 PM
Hi
I configured the LSM303DLHC accelerometer as follows. CTRL_REG1_A with 0x77 //400hz data CTRL_REG4_A with 0x00 //Little endian And started reading the data from the OUT_X / Y/ Z_L / H_A registers. But I could find something that the lower nibble was found to be zero all the time in theOUT_X_L_A, OUT_Y_L_A, OUT_Z_L_A registers. So is the data in LSM303 12bit left justified or am I missing something? Note: In datasheet i found it is 16bit but in some driver samples the values of the data registers are combined and right shifted by 4 bits (I assume this is to compensate the left justified data) Regards HpC #lsm303dlhc-data-format #lsm303dlhc
2014-12-27 10:04 AM
maybe spec of LSM303DLH is more informative regarding that issue.
2015-01-17 11:29 PM
2015-01-22 03:49 AM
Yes, they are left justified 16 bits wide. You can also verify this by looking at your output and using gravity as a reference. For example, if you set the range for +-2G (the default) you will see that when you have the accelerometer horizontal you will have a reading of about 16k (+- depending on which end is up) on the Z axis and close to 0 on the other 2 axes. +- 32k would be Full Scale if left justified and 1G is half full scale.