完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我正在使用STM32f469迪斯科板和x-nucleo-iks01a1扩展板,我正在尝试设置一些控制位。 我能够毫无问题地读取i2c上的所有寄存器。但是,如果我尝试写任何控制寄存器没有任何改变。 我还读到我必须通过设置相应的位来启用传感器,这当然对我也不起作用。 传感器设置为单次模式(我想更改),直到我断开并重新连接电源,我总是得到相同的值。 温度值是正确的,如果我用手指加热芯片(并断开/重新连接电源),传感器会改变其读数。 我想我阅读了所有文档,在配置传感器之前我找不到任何神秘的程序... 干杯, --Jens #hts221#control-register 以上来自于谷歌翻译 以下为原文 Hi, I'm using a stm32f469 disco board and a x-nucleo-iks01a1 extension board and I'm trying to set some of the control bits. I'm able to read all registers over i2c without any problems. But if i try to write any of the control registers nothing is changed. i also read that i have to enable the sensor by setting the corresponding bit, which of course doesn't work for me either. The sensor is set to one shot mode (which i want to change) and until i disconnect and reconnect the power supply i always get the same value. the temp-value is correct and the sensor changes its reading if i wARM the chip up by my finger (and dis-/reconnect the power). I think i read all documentation and i couldn't find any mysterious procedure to go through before configuring the sensor... Cheers, --Jens #hts221 #control-register |
|
相关推荐
6个回答
|
|
嗨,
你能告诉我你正在使用的设置顺序吗? 如果要使用单触发模式,则必须在CTRL_REG1(0x20h)或0x84(启用BDU)中写入0x80,并且为了开始转换,您必须在CTRL_REG2(0x21h)中写入0x01。 你使用的奴隶地址是什么? 注意:从地址是BFh用于读I2C事务,BEh用于写I2C事务。 问候 安东内拉 以上来自于谷歌翻译 以下为原文 Hi, Can you send me the sequence of settings that you are using? If you want to use the one shot mode,you have to write 0x80 in CTRL_REG1 (0x20h) or 0x84 (BDU enabled) and in order to start a conversion you have to write 0x01 in CTRL_REG2(0x21h). What is the slave address that you are using? Pay attention : the slave address is BFh for Read I2C transactions and BEh for Write I2C transactions. Regards Antonella |
|
|
|
嗨,
我正在使用C#和.net微框架,它完成大部分的i2c通信。 从地址是0x5F + R / W-bit - >写入事务为0xBE,读取为0xBF。由于我能够读取涉及写入事务的寄存器,这似乎是正确的。 我用示波器检查了数据,每一点都检查出来。 WHO_AM_I(0Fh)正确回复BCh。 AV_CONF(10h):1Bh CTRL_REG1(20h):0h CTRL_REG2(21h):0h CTRL_REG3(22h):0h STATUS_REG(27h):0h 我首先尝试阅读ctrl_reg,然后写下我的更改,我尝试先写不读。在它检出的总线上,写入传输由从机确认,但没有任何变化。 我在网上看过一些例子,即使是在不同的编程语言中,但是当我尝试相同的命令序列时,没有任何变化: - / 谢谢你的帮助, 干杯, --Jens 以上来自于谷歌翻译 以下为原文 Hi, I'm using C# and .net micro framework, which does most of the i2c-communication. Slave address is 0x5F + R/W-bit --> 0xBE for a write transaction, and 0xBF for a read. And since i'm able to read the registers which involves a write transaction, this seems to be correct. I've checked the data with my oscilloscope and every little bit checks out. WHO_AM_I (0Fh) replies correctly with BCh. AV_CONF (10h): 1Bh CTRL_REG1 (20h): 0h CTRL_REG2 (21h): 0h CTRL_REG3 (22h): 0h STATUS_REG (27h): 0h I tried reading the ctrl_reg first and then write my changes, I tried writing without reading first. On the bus it checks out, the write transmission is acknowledged by the slave but nothing changes. I've seen some examples on the web, even in different programming languages, but when i try the same command sequence nothing changes :-/ Thanks for your help, Cheers, --Jens |
|
|
|
|
|
|
|
嗨,
我只有这个例子,所以我不能尝试另一个例子。 编辑:我应该在一周内收到另一个董事会。我会尝试然后告诉你。 干杯, --Jens 以上来自于谷歌翻译 以下为原文 Hi, I only have this one example, so i can't try on another one. Edit: I should receive another board within a week. I'll try then and tell you about it. Cheers, --Jens |
|
|
|
|
|
|
|
嗨,
我回顾过去所有的帖子,我不认为坏的操作是设备的问题,而是I2C连接或总线的实现。 如果我理解正确,你使用的是x-nucleo-iks01a1扩展板,其上焊有HTS221和stm32f469迪斯科板。 x-nucleo-iks01a1与STM32 Nucleo板兼容,我通常使用这种组合没有任何问题(例如,-Nucleo-L152RE或-NUCLEO-F401RE)。 x-nucleo-iks01a1还配备了Arduino UNO R3连接器,我想你最后使用这个连接器将扩展连接到stm32f469迪斯科板。 说实话,我从未使用过这款stm32f469迪斯科板。 我建议你再次检查Arduino和amp; morpho连接器上I2C_SDA和I2C_SCL的连接。 DISCO-F469NI上的匹配应为PB_8和PB_9。 再次检查用于I2C的GPIO配置(必须使用micro的上拉)。 问候 安东内拉 以上来自于谷歌翻译 以下为原文 Hi, I reviewing all past posts, I don't believe that the bad operating is a problem of the device, but rather of the I2C connections or implementation of the bus. If I understand correctly, you are using a x-nucleo-iks01a1 extension board with HTS221 soldered on it and stm32f469 disco board. The x-nucleo-iks01a1 is compatible with STM32 Nucleo boards and I usually have used this combination without any problems ( for example ‎Nucleo-L152RE or ‎NUCLEO-F401RE ). The x-nucleo-iks01a1 is also equipped with Arduino UNO R3 connector and I suppose that you are using this last to connect the extension to the stm32f469 disco board. To be honest, I have never used this stm32f469 disco board. I suggest you to check again the connections for I2C_SDA and I2C_SCL on Arduino &morpho connector. The matching on DISCO-F469NI should be PB_8 and PB_9. Check again the configurations of GPIO used for I2C (you have to use the pull-up of the micro). Regards Antonella |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2649 浏览 1 评论
3213 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1787 浏览 1 评论
3617 浏览 6 评论
5996 浏览 21 评论
944浏览 4评论
1318浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
589浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1307浏览 3评论
1367浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-28 01:11 , Processed in 1.272502 second(s), Total 89, Slave 72 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号