完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我已经将LPS22HB开发套件(STEVAL-MET001V1)和带有I2C接口的Raspberry Pi 3连接起来并尝试读取压力和温度数据,但无论我尝试了什么设置,压力(0x28,0x29,0x2A)和温度(0x2B,0x2C)总能给我0xFF的。我尝试了一次(CTRL-REG1 0x00,CTRL-REG2 0x11)并且也是连续的
(CTRL-REG1 0x12,CTRL-REG2 0x10)但这些没有任何区别,我可以阅读WHO AM I寄存器和所有其他寄存器但压力和温度输出始终为0xff,0xff,0xff,0xff,0xff(单字节读取或转储)。我确信我做错了什么但是无法解决这个问题。有没有人经历过这样的事情?寄存器0x27显示0x03但我仍然无法读取数据(0xff)..请参阅附带的转储数据截图。 我希望有人能帮助我让这个芯片工作.. 问候。 以上来自于谷歌翻译 以下为原文 I have connected LPS22HB development kit (STEVAL-MET001V1) and Raspberry Pi 3 with I2C interface and tried to read pressure and temperature data but whatever setting I tried, pressure (0x28, 0x29, 0x2A) and temperature (0x2B, 0x2C) always gives me 0xff. I tried one shot (CTRL-REG1 0x00, CTRL-REG2 0x11) and also continuous (CTRL-REG1 0x12, CTRL-REG2 0x10) but these didn't make any difference, and I can read WHO AM I register and all other registers but pressure and temperature output always 0xff, 0xff, 0xff,0xff, 0xff (with single byte read or dump). I am sure I did something wrong but can't figure this out. Has anyone experienced something like this? Register 0x27 shows 0x03 but I still can't read data out (0xff).. Please see the attached screenshot for dump data. I hope someone could help me to make this chip work.. Regards. |
|
相关推荐
2个回答
|
|
如果使用1Hz,请等待1秒钟,然后再获取第一个未过滤的数据。
通常,检查传感器的所有电源电压是否存在(模拟和接口数字引脚) 然后尝试一次性模式,并检查转换后ONE_SHOT位是否自动清除。 祝你好运! 以上来自于谷歌翻译 以下为原文 If using 1Hz, wait for 1 second before getting the first unfiltered data. In general, check that all the supply voltages of the sensor are present (analog and interface digital pins) Then try in one shot mode, and check that the ONE_SHOT bit autoclears after the conversion. Good luck! |
|
|
|
谢谢你的建议。我检查了所有连接的引脚,发现SA0没有连接。将SA0连接到GND后,我可以毫无困难地读取压力和温度。可能我无法正确读取数据,因为SA0(I2C l***地址)是浮动的。
谢谢。 以上来自于谷歌翻译 以下为原文 Thank you for your suggestion. I had checked all pins connected and found SA0 was not connected. After I connected SA0 to GND, I could read pressure and temperature with no trouble. Probably I couldn't read data properly because SA0 (I2C l*** address) was floating. Thank you. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2578 浏览 1 评论
3194 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1763 浏览 1 评论
3589 浏览 6 评论
5967 浏览 21 评论
924浏览 4评论
1300浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
563浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1286浏览 3评论
1338浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-6 09:21 , Processed in 1.068985 second(s), Total 79, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号