完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,大家好,我打算在我的主板上使用LSM9DS1作为标题传感器,我很好奇一些引脚的功能 - 我在数据表中找不到任何详细的描述。
引脚说明将引脚5,6(SDO_A / G,SDO_M)描述为I2C模式的“器件地址的I2C最低有效位” - 如果在I2C模式下与模块通信则需要这些吗? 我还假设需要将引脚7,8(CS_A / G,CS_M)从VDD_IO外部拉高以启用I2C模式吗? 并且需要引脚9 - 13还是可以只使用I2C总线与模块通信并读回测量值等?我猜测中断会很方便警告跌倒或类似的东西,但不一定是必需的?我不确定Data Ready,Data Enable Pins的用途? 提前谢谢了! 戴夫 #lsm9ds1 以上来自于谷歌翻译 以下为原文 Hi Guys, I'm planning on using the LSM9DS1 as a heading sensor on my board, and I was curious about the functionality of some of the pins - I couldn't find any detailed description in the datasheet. The pin description describes Pins 5,6 (SDO_A/G, SDO_M) as 'I2C least significant bit of the device address' for I2C mode - are these required if talking to the module in I2C mode? Also am I correct in assuming that pins 7,8 (CS_A/G, CS_M) just need to be pulled high externally to VDD_IO to enable I2C mode? And are pins 9 - 13 required or is it possible to just use the I2C bus to talk to the module and read back measurements etc? I'm guessing the interrupts would be handy to alert to a fall or something like that but would not necessarily be required? And I'm not sure the purpose of the Data Ready, Data Enable Pins? Many Thanks in advance! Dave #lsm9ds1 |
|
相关推荐
14个回答
|
|
引脚SDO_A / G和SDO_M定义传感器的I2C地址。请参见表19.如果在同一I2C总线上有两个传感器,则可以使用它。您必须将其连接到VDD_IO或GND。
要启用I2C模式,必须将CS_A / G和CS_M连接到VDD_IO。 引脚9-13的连接是可选的。如果您需要在检测到某些重要动作时唤醒您的微控制器,您可以使用中断引脚。当新数据可用时,在数据就绪引脚上产生脉冲。关于数据使能引脚,请看这里 https://community.st.com/message/10077 。 以上来自于谷歌翻译 以下为原文 The pins SDO_A/G and SDO_M defines the I2C address of your sensor. Please see Table 19. It can be used in case you have two sensors on the same I2C bus. You have to connect it to VDD_IO or GND. To enable I2C mode you have to connect CS_A/G and CS_M to VDD_IO. Connection of pins 9-13 is optional. If you need for example wake-up your microcontroller when some significant motion is detected you can use the interrupt pins. When new data are available pulses are generated on data ready pins. Concerning the Data Enable pin please have a look here https://community.st.com/message/10077 . |
|
|
|
非常感谢Miroslav,这很棒。
干杯, 戴夫 以上来自于谷歌翻译 以下为原文 Many Thanks Miroslav, that's great. Cheers, Dave |
|
|
|
实际上还有一个更快的跟进 - 我看过DEN_A / G帖子,但我仍然不确定我完全理解。它是输入引脚吗?允许在I2C总线上外部打开A / G数据?
谢谢, 戴夫 以上来自于谷歌翻译 以下为原文 Actually one more quick follow-up - I've had a look at the DEN_A/G post, but I'm still not sure I understand fully. Is it an Input pin? To allow external turn on of A/G data on the I2C bus? Thanks, Dave |
|
|
|
我明白了,DEN_A / G ping的名称有点误导。它是输入引脚但不能打开A / G数据。
此pis的目的是使测量与外部信号同步,如果您不需要此功能,则可以保持未连接状态。 要启用此功能,您必须在寄存器中对其进行配置。 以上来自于谷歌翻译 以下为原文 I see, the name of the DEN_A/G ping is little bit misleading. It is input pin but not to turn on the A/G data. The purpose of this pis is to synchronize the measurement with external signal, if you don't need this functionality you can keep i unconnected. To enable this functionality you have to configure it in the registers. |
|
|
|
你好米罗斯拉夫,
可能你可以解释我在描述中没有找到的东西。 关于表19.列SA0 - 黄色。 LSB用于加速度计或陀螺仪。 值“0”和“1”在哪些情况下? 是否意味着我必须相应地设置输入引脚5(SD0_ / AG) 提前致谢 Dmitrij 以上来自于谷歌翻译 以下为原文 Hallo Miroslav, probably you can explain me what i have not found in description. Concerning the table 19. Column SA0 - yellow. LSB for accelerometer or gyroscope. Values '0' and '1' in which cases ? Whether does mean that i must correspondingly set input pin 5 (SD0_/AG) Thanks in advance Dmitrij |
|
|
|
如果在同一I2C总线上有两个传感器,则必须通过不同的SD0_ / AG连接区分它们,从而区分不同的I2C地址。
以上来自于谷歌翻译 以下为原文 If you have two sensors on the same I2C bus you have to distinguish them by different SD0_/AG connection thus different I2C address. |
|
|
|
你好,
我不确定我是否理解你的问题。表19描述了加速度计和陀螺仪的I2C地址,两个传感器具有相同的地址。如果引脚连接到GND,则SAD [0]位为0,如果引脚连接到VDD_IO,则SAD [0]位为1。 以上来自于谷歌翻译 以下为原文 Hello, I'm not sure if I understand you question. The Table 19 describes the I2C address for accelerometer and gyroscope, both sensors have the same address. If the pin is connected to GND the SAD[0] bit is 0, if the pin is connected to VDD_IO the SAD[0] bit is 1. |
|
|
|
表中第1行和第3行之间或第2行和第4行之间有什么区别?
在我看来,列“R / W”和相应的信号“read-write”与设备地址SAD [6:1]一起唯一地定义了操作。那么,SA0的意义是什么? 是否意味着它只是在SA0上无关紧要的“0”或“1”? 以上来自于谷歌翻译 以下为原文 What is the difference between 1-st and 3-rd rows in the table or between 2-nd and 4-th ? It seems to me that the column “R/Wâ€� and correspondingly signal “read-writeâ€� together with device address SAD[6:1] uniquely define the operation. So, what is the sense of SA0? Whether does mean that simply it is indifferent “0â€� or “1â€� on SA0 ? |
|
|
|
“两个传感器。”
你的意思是两种不同的传感器设备,例如LSM9DS1连接到同一个I2C总线? LSM9DS1的生产是否设置了I2C的默认地址? 以上来自于谷歌翻译 以下为原文 'Two sensors.' Do you mean two different sensor devices, e.g. LSM9DS1 connected to the same I2C bus ? Is there the default address of I2C set by production for LSM9DS1 ? |
|
|
|
是的,在示例中,两个LSM9DS1连接到同一个I2C总线。
只有两个7位地址可能110101b = 0x6A或110101b = 0x6B,最后一位由连接设置 SDO_A / G引脚。 以上来自于谷歌翻译 以下为原文 Yes, in example two LSM9DS1 connected to the same I2C bus. Only two 7-bit addresses are possible 110101b = 0x6A or 110101b = 0x6B, the last bit is set by the connection SDO_A/G pin. |
|
|
|
谢谢。
你会回答另一个问题吗? 我有I2C 0x6A的地址。我想不读WHO_AM_I(0x0F)和STATUS_REG(0x17) 是否需要为加速度计设置许多控制寄存器或仅为其中一些设置? 我的尝试只给我两个空值。 以上来自于谷歌翻译 以下为原文 Thank you. Will you be so kind as to answer another question ? I have the address of I2C 0x6A. I want ot read WHO_AM_I (0x0F) and STATUS_REG(0x17) Is it neccessary to set many control registers for accelerometer or only some of them ? My try gives me only nulls in both of them. |
|
|
|
您无需设置任何寄存器即可读取任何传感器寄存器。
读 WHO_AM_I(0x0F)寄存器是检查传感器连接和I2C设置是否正确的良好开端。 如果你读了零,那你就错了。 以上来自于谷歌翻译 以下为原文 You don't have to set any register to be able to read any sensor register. Read WHO_AM_I (0x0F) register is good start to check your sensor connection and I2C settings is correct. If you read zeros then you have something wrong. |
|
|
|
非常感谢你。
有些问题更多。 1。 子地址 手册说: 在加速度计和陀螺仪传感器的I2C中,在启动条件(ST)之后发送从属地址,一旦返回从属确认(SAK),就发送8位子地址(SUB)。 8位子地址(SUB) - 寄存器地址? 2从站地址。 在表15中,为了从传感器读取一个字节: ST SAD + W SAK SUB SAK 我有SAD [6:1] = 0x6A SAD + W - 没有SA0的7位从机地址? 即,我有I2C地址110101 = 0x6A 7位SAD [6:1] + W = 110101 + 0 = 0x6A 要么 SA0也必须考虑在内,如果SA0 = 0, 8位SAD [6:1] + SA0 + W = 110101 + 0 + 0 = 0xD4 以上来自于谷歌翻译 以下为原文 Thanks you very much. Some questions more. 1. Sub-address Manual says: In the I2C of the accelerometer and gyroscope sensor, after the start condition (ST) a slave address is sent, once a slave acknowledge (SAK) has been returned, an 8-bit sub-address (SUB) is transmitted. 8-bit sub-address (SUB) – register address ?
In table 15 in order to read one byte from sensor: ST SAD+W SAK SUB SAK I have SAD[6:1] = 0x6A SAD+W – 7-bit slave address without SA0 ? I.e., I have I2C address 110101 = 0x6A 7-bit SAD[6:1] + W = 110101 + 0 = 0x6A Or SA0 must be taken into account too and then, if SA0 = 0, 8-bit SAD[6:1] + SA0 + W = 110101 + 0 + 0 = 0xD4 |
|
|
|
米罗斯拉夫,谢谢你的回答。
我已经成功阅读了WHO_AM_I登记册。恕我直言,描述不清楚。 我在这里写了c♯和IoT的代码。 I2cDevice i2cDevAccel - c♯通信通道I2C的对象。 // I2C传感器地址= 0x6A // 7位从机地址SAD [6:1] +写 - > 0x6A + 0 - > 0xD4 字节 [] buf1 = 新 字节 [] {0xd4}; //注册地址WHO_AM_I = 0x0F 字节 [] buf2 = 新 字节 [] { 我是谁 }; //阅读结果 字节 [] buf3 = 新 字节 [1]; i2cDevAccel.Write(BUF1); i2cDevAccel.WriteRead(buf2,buf3); buf3中的结果必须等于0x68。 再一次非常感谢你。 以上来自于谷歌翻译 以下为原文 Miroslav, thank you for your answers. I‘ve succeeded to read the register WHO_AM_I. IMHO the description is not clear. I write here code for c♯ and IoT. I2cDevice i2cDevAccel – c♯ object for communication channel I2C. //I2C sensor address = 0x6A //7-bit slave address SAD[6:1] + write -> 0x6A + 0 -> 0xD4 byte [] buf1 = new byte [] { 0xd4 }; //address of register WHO_AM_I = 0x0F byte [] buf2 = new byte [] { WHO_AM_I }; //result of reading byte [] buf3 = new byte [1]; i2cDevAccel.Write(buf1); i2cDevAccel.WriteRead(buf2, buf3); Result in buf3 must be equal to 0x68. Once more thank you very much. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2632 浏览 1 评论
3208 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1783 浏览 1 评论
3607 浏览 6 评论
5987 浏览 21 评论
939浏览 4评论
1315浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
582浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1302浏览 3评论
1357浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 08:04 , Processed in 1.526146 second(s), Total 103, Slave 86 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号