嗨,
我正在使用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
嗨,
我正在使用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
举报