完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我正在使用DFROBOT(http://www. dFofBOt.com / wiki / index)的10个DOF IMU板。我已经成功地与四个传感器中的两个建立了I2C通信,但由于某种原因,我无法与陀螺仪和指南针进行通信。这两个都只是NACK写入时(我用逻辑分析仪来检查通信)。我已经检查并重新检查了代码,看不到任何错误或问题。我也尝试过用5 V的IMU来代替CY8KIT的3.3,情况并没有改善。我开始觉得参议员们不好。有人可以建议进一步的故障排除和/或查看我的代码进行清醒检查吗?
我还附上了两个没有通信传感器的数据表。 提前感谢 ZIP 3兆字节 PS-ITG-3200—0-01.4.PDF 1.1兆字节 HMC583L FDSPDF 661.2 K 以上来自于百度翻译 以下为原文 I'm using this 10 DOF IMU board from dfRobot (https://www.dfrobot.com/wiki/ind ... r_V2.0_SKU:_SEN0140) for a project I'm working on. I have set up i2c communication with two of the four sensors successfully, but for some reason I cant get the communication to the gyroscope and compass to work. Both just NACK when written to (I'm using a logic analyzer to check the communications). I have checked and rechecked the code, and cant see any mistakes, or issues. I have also tried powering the IMU with 5 V instead of the 3.3 from cy8kit, the situation did not improve. I'm beginning to think the senors are bad. Can anyone suggest any further trouble shooting and/or look over my code for a sanity check? I have also attached the datasheets for both no communicating sensors. Thanks in advance
|
|
相关推荐
8个回答
|
|
它说你的变量有一些问题。其中一个器件的最大VCC为3.6伏。我也会检查地址和选择信号。
以上来自于百度翻译 以下为原文 It says you have some issues with your variables. Also one of the devices has a max Vcc of 3.6 Volts. Also I would check the address and selection signals. |
|
|
|
变量的问题,不应该有什么区别。设置这些警告是因为我将值传递给它们,然后从不使用变量来进行任何操作。我只是把它们放在代码中,这样我就可以看到在局部变量选项卡中调试时返回的值。IMU具有线性稳压器以保持电压为3.3V。 罗盘只有一个地址,陀螺仪有两个地址,这两个地址我都试着用过,虽然通过看原理图,它应该是地址0x68,因为ADO(备用地址引脚)是GNDd。 以上来自于百度翻译 以下为原文 The issues with the variables, shouldnt make a difference. Those warnings are being set because i am passing values to them and then never using the variables for anything. I simply put them in the code so that I can see the values returned during debugging in the locals tab. The IMU has a linear regulator to keep the voltage at 3.3V The compass has only one address, and the gyro has two addresses, both of which i have tried to use, though by looking at the schematic it should be address 0x68 because the ADO ( alternate address pin) is GNDd. |
|
|
|
nywerwer 发表于 2018-10-17 13:28 I2C器件的典型误差: 丢失的上拉电阻,或者错误的值(我在你们的示意图中没有看到)在I2C线路上的其他部分(可能发生在PSoC DEV板上,例如在某些引脚上有电容和LED)错误的I2C地址格式(PSoC API需要7位地址),或者错误的寻址长数据线,以及在端口上的高转换率,可能会导致最好的调试方式:要么仔细查看您的示意图和代码(用“我知道有bug隐藏”的心态),或者使用范围(或逻辑分析仪)。 以上来自于百度翻译 以下为原文 Typical errors with I2C devices:
|
|
|
|
是的,我看到了电压调节器,但是PSoC芯片的VCC对信号幅度有影响。我也没有你的板所以我不能解决你的程序。 以上来自于百度翻译 以下为原文 Yes I saw the voltage regulator but the Vcc of the PSOC chip has an effect on the signal amplitude. Also I don't have your board so I can't troubleshoot your program. |
|
|
|
我只有一个HMC583L。 我在CY8CKIT PSoC 5LP 059上用这个传感器检查了你的项目。 我的联系人P1.6(SDA)P1.7(SCL)被设置为电阻拉(没有外部电阻)。 我看到ACK: 以上来自于百度翻译 以下为原文 I only have a HMC5883L. I checked your project with this sensor on the CY8CKIT-PSoC 5LP 059 My contacts P1.6(SDA) P1.7(scl) is set to Resistive pull up (with no external resistors) I see ACK: |
|
|
|
chenzhenbo1984 发表于 2018-10-17 13:57 所以我现在有陀螺工作,简单的情况是,在复制和粘贴部分功能之后,不要改变写BVF的名字,这是我没有花时间打字的原因。但是仍然没有从指南针得到任何东西。我的代码是用来获取ACK的确切代码吗?我从奴隶那里找不到任何东西来写作(除了NAK)。 恒星… 以上来自于百度翻译 以下为原文 So i have the gyro working now, simple case not changing the write buf vsariable names after copying and pasting parts of the function, thats what i get for not taking the time to type out things. still not getting anything from the compass though. Is my code the exact code you used to get it to ACK? i get nothing from the slave on setup to write (besides NAK). Stellar.. |
|
|
|
nywerwer 发表于 2018-10-17 14:03 我没有更改代码。只是为了方便我联系。 按下重置并从分析器得到波形。 以上来自于百度翻译 以下为原文 I did not change the code. Only contacts for my convenience. Just pressed the reset and got the waveform from analyzer. |
|
|
|
我发现了这个问题。显然,传感器实际上不是HMC583L,它是QMC583L,其冲压像霍尼韦尔一。IMU被广告称为具有霍尼韦尔部件。当然,这并没有记载在任何地方,我只是在网上找到了关于KokFOFF的东西,我想我会尝试改变地址来查看。 万一有人在这个线程上遇到类似于假设的HMC583或来自DFROBOT的10DOF IMU的问题,QMC583L:HTTP://IMG.FielpFLop.com/文件/下载/数据表-QMC583L 1.0%20.PDF的数据表。 感谢大家的帮助和投入。 以上来自于百度翻译 以下为原文 I found the issue. Apparently the sensor is not actually an HMC5883L, it is a QMC5883L, its stamped like the Honeywell one though. The IMU is advertised as having the Honeywell part. This is, of course, not documented anywhere i just found something about the knockoff online and thought i would try it out changing the address to see. In case anyone else stumbles across this thread with similar issues with a supposed HMC5883 or the 10DOF IMU from dfrobot, the datasheet for the QMC5883L: http://img.filipeflop.com/files/download/Datasheet-QMC5883L-1.0%20.pdf Thanks to everyones help and input. |
|
|
|
只有小组成员才能发言,加入小组>>
756个成员聚集在这个小组
加入小组2124 浏览 1 评论
1865 浏览 1 评论
3681 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1800 浏览 6 评论
1545 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
605浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
450浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
448浏览 2评论
400浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
1081浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-11 10:07 , Processed in 0.855344 second(s), Total 60, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (威廉希尔官方网站 图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号