纬图虚拟仪器论坛

 找回密码
 立即注册
搜索
查看: 3054|回复: 0

Ginkgo I2C 主从模式收发数据配置及其结果

[复制链接]
发表于 2021-11-17 17:38:02 | 显示全部楼层 |阅读模式
Ginkgo I2C master-slave mode send and receive data configuration and its results

1. Slave side:
i2c-slave-code-init.png
Note: subaddress is 0, it is convenient to collect all the data.

2. Master side:
I2c-master-init.png
note: Select subaddress width of 2 bytes.

3. Send on master side:
i2c-master-send.png

4. Receive on slave side:
i2c-slave-rcv.png

5. I2C works as slave mode, the first two bytes are subaddress, so sometimes it is thought that no data has been received,
    If you see the following waveform, it indicates that the communication has been successful,
    because the ACK has already responded
ws.jpg

Therefore, at this time, the host can see the actual data by sending multiple bytes.







回复

使用道具 举报

发表于 2022-8-22 16:04:08 | 显示全部楼层
小结:
I2c 主模式,从模式的子地址配置规则:
只有从模式读操作,子地址配成0字节,其余都配置成2字节宽。
原因:芯片内部限制,而客户需求会0-4字节不等,所以折中设计为2字节宽。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|纬图虚拟仪器

GMT+8, 2024-12-22 11:56 , Processed in 0.197914 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表