ST意法半导体
直播中

刘文娟

7年用户 165经验值
私信 关注
[问答]

LSM303AGR如何在加速度计上获得12位分辨率

LSM303AGR如何在加速度计上启用高分辨率模式?我完全按照数据手册/手册中的说明将LPen位设置为0,将HR位设置为1.我可以使用这些位,但看起来我的分辨率没有变化。我的程序写出的数据与示波器上显示的数据字节完全匹配(使用串行SPI解码)。 6个最低有效位始终为0.设置BLE位不会交换字节的顺序,这表示我无法激活高分辨率模式(BLE仅在高分辨率模式下工作)。任何可以在这里提供帮助的人,在加速度计上获得12位分辨率的技巧是什么?
我的注册设置:
- CTRL_REG1_A设置为0x67(ODR 200 Hz,LPen = 0,全部3轴启用)
- CTRL_REG2_A设置为0x00(禁用高通内容)
- CTRL_REG3_A设置为0x02(int1上的FIFO溢出int)
- CTRL_REG4_A设置为0x89(BDU = 1,LSB位于较低的adr,HR = 1高res,SPI启用,正常模式)
- CTRL_REG5_A设置为0x40(启用FIFO)
- CTRL_REG6_A设置为0x02(int低电平有效)
- FIFO_CTRL_REG_A设置为0x40(FIFO模式)
任何具有12位分辨率的寄存器设置序列的人?

以上来自于谷歌翻译


以下为原文




LSM303AGR how to enable high resolution mode on the accelerometer? I have done exactly as described in the data sheet/manual setting the LPen bit to 0 and the HR bit to 1. I can play around with these bits but it does not look like I get a change in the resolution. The data written out by my program matches exactly the data bytes shown on my oscilloscope (with serial SPI decoding). The 6 least significant bits are always 0. Setting the BLE bit does not swap the order of the bytes which indicates that I am not able to activate the high resolution mode (BLE only works in high res mode). Anyone who can help here, what is the trick to get 12-bit resolution on the accelerometer?
My register settings:
- CTRL_REG1_A set to 0x67 ( ODR 200 Hz, LPen = 0, all 3 axis enabled)
- CTRL_REG2_A set to 0x00 (high pass stuff disabled)
- CTRL_REG3_A set to 0x02 (FIFO overrun int on int1)
- CTRL_REG4_A set to 0x89 (BDU=1, LSB at lower adr, HR=1 high res, SPI enabled, normal mode)
- CTRL_REG5_A set to 0x40 (FIFO enabled)
- CTRL_REG6_A set to 0x02 (int active low)
- FIFO_CTRL_REG_A set to 0x40 (FIFO mode)
Anyone who have a sequence of register settings which gives 12-bit resolution?

回帖(2)

曾玲娟

2018-9-10 17:26:56
您只看到10位值的原因是使用FIFO。 FIFO缓冲区能够为每个通道存储多达32个10位加速度样本。请查看应用说明中的第4.8章
http://www.st.com/resource/en/application_note/dm00265383.pdf
要获得12位分辨率输出,必须禁用FIFO。

以上来自于谷歌翻译


以下为原文




The reason why you see only 10-bits value is usage of FIFO. The FIFO buffer is able to store up to 32 acceleration samples of 10 bits for each channel. Please check chapter 4.8 in application note
http://www.st.com/resource/en/application_note/dm00265383.pdf
.To get 12-bit resolution output you have to disable the FIFO.
举报

刘文娟

2018-9-10 17:42:37
谢谢!我昨天有这个想法,但我没试过。我可能不会使用LSM303AGR,只有一段时间,直到我的应用程序有一个更好的电子罗盘。磁力计的分辨率也没有让我印象深刻。
我喜欢LSM303DLHC(但没有SPI),这是我迄今为止尝试过的最好的ST电子罗盘(已经有一段时间的NRND)。我也尝试了LSM303C,并将对它进行更多测试,看看我是否已经做好了一切。我在LSM303C上的第一次温度测试是疯狂的,当从大约0℃到室温进行测试时,在航向上有大约10度的漂移。我在这里读到LSM303C基于LIS3MDL,它也有一个疯狂的温度漂移。
我正在考虑试用LSM303D。这个状态仍然活跃,我希望它和DLHC一样好。看起来有些仓库表明它不再可用了。

以上来自于谷歌翻译


以下为原文




Thank you! I had that idea yesterday but I did not try it out. I am probably not going to use the LSM303AGR, only for a while until I have a better e-compass for my application. The resolution from the magnetometer does not impress me either.
I liked the LSM303DLHC (but no SPI) which is the best ST e-compass I have tried so far (which has had a NRND for a while). I have also tried out LSM303C and are going to test it some more to see if I have done everything correct. My first temperature test on the LSM303C was insane, had about 10 degree drift on the heading when running a test from approx 0 deg.C to room temp. I read somewhere in here that LSM303C is based on LIS3MDL which also has a insane temperature drift.
I am thinking about trying out the LSM303D. The status is still active on this one, I hope it is as good as the DLHC. It looks like some of the warehouses indicates that it is not available anymore.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分