ST意法半导体
直播中

杨艳

7年用户 204经验值
私信 关注
[问答]

怎么使用GPIO引脚连接其他I2C端口?

有没有人想出一种将GPIO端口用作I2C的方法?我当前的应用程序使用外部I2C多路复用器来制作三个I2C通道。我想用STM8的独立I2C输出替换这个硬件。所以我在MCU上有三个I2C主地址。

谢谢
杰夫

以上来自于谷歌翻译


以下为原文






Has anyone come up with a way to use GPIO ports as I2C? My current app uses an external I2C mux to make three I2C channels. I would like to replace this HW with independent I2C output from the STM8. So I would have three I2C master addresses on the MCU.



Thanks

Jeff

回帖(1)

姜葳

2019-5-13 07:01:59
我使用数据表中任何以O1为速度的引脚都应该设置,我没有查看ST库代码源,但是你可以复制它以获得良好的开端。

以上来自于谷歌翻译


以下为原文





I'd use any pin in the datasheet that have O1 as the speed and you should be set, I haven't looked at the ST Library code source but you might be able to copy that to get a good start.
举报

更多回帖

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