ST意法半导体
直播中

王睦羽

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

没有办法从LSM303AGR读取数据怎么办

tify;text-indent: 40px;">嗨,我是新来的,我是新工作的mems。
我有一个LPCXpresso1549评估板和一个实现lsm303agr芯片的Steval-MKI172v1 mems。
我正在使用mbed平台,我需要从加速度计读取值,但我尝试了很多,无法读取任何内容。

我将SCL和SDA的引脚,3V3引脚连接到VDD引脚,GND和两个数字引脚连接到CS和CS_A(lsm303agr上的芯片选择)。
我不知道我的lsm303有什么地址,我无法理解我需要在寄存器上写什么地址

回帖(2)

王官君

2018-9-11 17:01:21
如果有VDDIO,则需要将其作为串行接口的电压源。
仔细阅读数据表,如果使用I2C,请确保您可以为每个功能(Accelero和Magneto)正确读取WHO_AM_I_REG @ 0x0F。
用示波器检查,否则确保I2C看起来很好,并且每条线路都有一个上拉电阻。
或扫描所有I2C从地址,直到检测到ACK为止......

以上来自于谷歌翻译


以下为原文




If there is a VDDIO this needs to be the voltage source of the serial interface.
Read carefully the datasheet and if using the I2C, make sure you can read the WHO_AM_I_REG @0x0F properly for each function (Accelero and Magneto).
Check with an oscilloscope otherwise to make SURE the I2C is looking good and there is a pull-up on each line.
Or sweep all the I2C slave addresses until an ACK is detected...
举报

曾玲娟

2018-9-11 17:14:04
如果使用I2C总线,则必须在SDA nad SCL线上连接上拉电阻。 CS引脚需要连接到VDDIO。 VDDIO也连接到电源。
传感器的I2C地址如下。

以上来自于谷歌翻译


以下为原文




If you are using I2C bus, you have to connect pull-up resistors on the SDA nad SCL lines. CS pins needs to be connected to VDDIO. VDDIO also connected to power supply.
The I2C addresses of the sensors are following.
举报

更多回帖

×
20
完善资料,
赚取积分