This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] LMH0318:使用 I2C/SMBus 读取 LMH0318上的寄存器

Guru**** 2510095 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1020902/lmh0318-reading-regs-on-lmh0318-using-i2c-smbus

器件型号:LMH0318

Hallo、

我对使用 I2C/SMBus 读取寄存器感到困惑。

读取 SNLU183、我发现对寄存器的写入应使用以下协议:

|RAW |寄存器地址|寄存器内容|寄存器掩码|

因此使用以下符号

S                         启动条件
P                         停止条件
RD/WR (1位)       读/写位。 Rd 等于1、WR 等于0。
A、NA (1位)       确认(ACK)和不确认(NACK)位
DevAddr (7位) I2C 7位地址。 请注意、这可以照常扩展以获取10位 I2C 地址。
[..]                          I2C 器件发送的数据、而不是主机适配器发送的数据。

要写入寄存器、我会生成以下 I2C 序列:

S DevAddr WR [A]寄存器地址[A]寄存器内容[A]寄存器掩码[A] P

它按预期工作(我使用 的是 SNLU183中提供的事务)。

如果我想从寄存器中读取数据、我无法确定如何转换 SNLU183中提供的协议

|RAR |寄存器地址|寄存器内容|寄存器掩码|

I2C/SMBus 事务。

有人可以帮助我使用我用于描述写事务的 I2C 符号吗?

提前感谢

此致。