Microchip
直播中

李晓欢

8年用户 351经验值
私信 关注
[问答]

SMbus块读取怎么决定要接收多少数据

嗨,伙计们。我正在读SMBus规范,发现了一些我不知道的东西。附件1显示了块读取图,我真的不知道为什么字节计数是由奴隶决定的(附件2)。不是大师?我想由它来决定要接收多少数据,谢谢。

以上来自于百度翻译


      以下为原文

    Hi, guys.
I'm reading the smbus spec and found something that I don't know.

The attachment 1 shows block read diagram, which I really don't know is that why Byte Count is determined by slave(attachment 2)? not Master?

I think it's up to Master to decide how many data it want to receive.

Thanks.
   Attached Image(s)

回帖(19)

吴键洪

2018-11-26 16:13:49
不,奴隶告诉主人它应该读取多少字节来选择地址。

以上来自于百度翻译


      以下为原文

    No, the Slave is telling the Master how many bytes it should read for the selected address.
 
举报

冯栋

2018-11-26 16:26:00
QHB:M…我感到困惑。在I2C中,无论读到多少字节,大师都只是去读,就像:开始& GT;地址+W-& GT;寄存器&重复的开始& GT;地址+ R & GT;寄存器中的数据字节。SMBus也是这样吗?我认为在SMBus应该是:开始-GT;地址+W->命令& gt;重复启动&字节计数-gt;地址+ r & gt;数据字节从命令。

以上来自于百度翻译


      以下为原文

    To qhb:
m.... I got confused.
 
In the I2C, the master just go read no matter how many bytes master wants to, just like:
 
Start -> address+W -> register -> Repeated start -> address+R -> data bytes from register.
 
So does SMBus? I thought in SMBus it should be:
 
Start -> address+W -> command -> Repeated start -> Byte count -> address+R -> data bytes from command.
举报

吴键洪

2018-11-26 16:40:34
这是完全一样的,“地址+R”必须遵循重复启动。SMBus文档告诉您,读取的第一个字节将告诉您应该读取多少字节才能获得整个寄存器。

以上来自于百度翻译


      以下为原文

    It's exactly the same, the "address+R" must follow the repeated start.
The SMBUS documentation tells you that the first byte you read will tell you how many bytes you should read to get the whole register.
 
举报

陈晨

2018-11-26 16:45:58
问题是,主如何知道要读取多少字节?虽然大多数SMBus项目是2字节,但块读取没有指定长度。

以上来自于百度翻译


      以下为原文

    The question is how does the master know how many bytes to read? While most smbus items are 2 bytes, the block read has not specified length.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分