你好
我按如下方式配置了LSM303DLHC加速度计。
CTRL_REG1_A,带有0x77 // 400hz数据
CTRL_REG4_A与0x00 //小端
并开始从OUT___A寄存器读取数据。
但我可以找到一些东西,发现下部的半字节一直都是零
OUT___A,OUT___A,OUT___A寄存器。
那么LSM303 12bit中的数据左对齐还是我遗漏了什么?
注意:在数据表中我发现它是16位,但在某些驱动程序样本中,数据寄存器的值被组合并右移4位(我假设这是为了补偿左对齐数据)
问候
HPC
#lsm303dlhc-data-format#lsm303dlhc
以上来自于谷歌翻译
以下为原文
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___A registers.
But I could find something that the lower nibble was found to be zero all the
time in the
OUT___A,
OUT___A,
OUT___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