Microchip
直播中

杨秀兰

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

PIC32MK I2C引脚如何定义

嗨,我正在继续与PIC32 MK的“战斗”。你知道如何定义I2C引脚吗?没有概念I2C1,I2C2…SDA和SCL没有提到相关的输入/输出表中。顺便说一下,SDA引脚是双向的。是否需要使用“手动”接口tiRS、POR锁存序列和在读/写顺序之后改变I/O?文档说明:当I2C配置到给定引脚时,它就成为开放的集电极。但是如何做这个配置(示例ReGe12= & Gt;SDA和ReGe13= & Gt;SCL)?谢谢帮忙?

以上来自于百度翻译


      以下为原文

    Hi, I'm continuing my "fighting" with PIC32MK. Do you know how to define I2C pins. There are not notion I2C1, I2C2... The SDA and SCL are not mentioned into related Input/Output tables. BTW the SDA pin is bidirectional. Do I need to use "manual" interface TRIS, POR LATCH sequence and change I/O following Read/Write sequence?  The documentation says: when I2C is configure to given pins its becomes Open Collector. But how to do this configuration (Example REGE12 => SDA and REGE13 => SCL)? Thanks for help?  

回帖(4)

杨晓健

2018-11-20 15:35:12
数据表只提到I2C软库:-(艾伯特)

以上来自于百度翻译


      以下为原文

    Datasheet only mentions the i2c soft library :-(
 
Albert
举报

李子跃

2018-11-20 15:41:00
从数据表中很明显,没有I2C硬件。所以你也要:1。使用和谐位敲击I2C图书馆AROR2。使用你自己的或A.N.Other的BIT I2C图书馆。IHOO是没有大的,因为I2C自从第一个MX就一直在PIC32上运行,并且我有自己的NIT敲击的I2C库。

以上来自于百度翻译


      以下为原文

    It's pretty obvious from the datasheet that there is no I2C hardware. So you are going to either:-
1. Use the Harmony bit-banged I2C library
or
2. Use your own or A.N.Other's bit-banged I2C library.
 
IMHO tis is no biggy, as I2C has been flakey on PIC32 since the first MX, and I have my own nit-banged I2C library.
举报

简白伊

2018-11-20 15:50:33
谢谢你的回答。这并不令人鼓舞。我过去也开发了我自己的“一页”库,但对于DSPIC33 EP家族来说,PIC32 MK真的不同。我的HW已经准备好了,幸运的是,我总是使用CPLD来实现所有的数字I/O。这就是为什么我能够适应任何连接。亲爱的西蒙格123也许对“PIC32 MK的勇士”LOL的小帮助:我的最好

以上来自于百度翻译


      以下为原文

    Thanks for your answer. That is not really encouraging.  I've also in the past developed my own "one page" libraries but that was for dsPIC33EP family what is really different with PIC32MK. My HW is ready and fortunately for me I'm using always a CPLD to all digital I/O. That is why I'm able to adapt any connection. Dear Simong123 perhaps small help for "PIC32MK's warriors" LoL: My best 
举报

陈杰

2018-11-20 16:07:09
HTTP://www. McCHIP.COM/FUMMS/FUNDSPE/103575

以上来自于百度翻译


      以下为原文

    http://www.microchip.com/forums/FindPost/1034755
举报

更多回帖

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