大家好,我所面临的问题已经在下面的线程中被解开:http://www. McCys.com /
开云(中国)官方/ M47 8248. ASPX。我有完全相同的问题:在发送地址和R/W位之后,在设置停止位时,会遇到总线冲突。你可能会问,为什么在地址被发送之后设置停止位?我用它作为一个I2C总线扫描器,我只想知道相应的地址是否有一个附加的有源设备,如果我发送它的地址,它会告诉我一个知识。我的问题与原始帖子的主要区别是:由于我用I2C面对这个问题,我把所有的I2C设备从总线上删除了。所以没有设备连接到I2C总线上。我这样做是为了验证我的扫描是否正确地通过所有的地址。我假设附件中的一个设备被卡住并保持我的SDA线低,但是由于没有设备被连接,我认为这不应该发生。看起来PIC32的I2C主机会被卡住并保持SDA线低(因此产生总线冲突)。在原来的帖子中所说的序列,在启用I2C模块之前,将I2C引脚设置为高状态并没有帮助。是否有人也面临同样的问题,我有暗示或解决方法?我正在使用PIC32 MX230F156D。我附上了一个逻辑分析仪的图片,告诉你总线上发生了什么(记住:没有设备附在总线上)。
以上来自于百度翻译
以下为原文
Hi everyone,
The problem I am facing was already disucussed in the the following thread:
http://www.microchip.com/forums/m478248.aspx.
I have exactly the same problem: After sending the address and R/W bit, I get a bus collission when set
ting the stop bit. You'll probably ask, why setting the stop bit after the address was sent? I use it for an I2C bus scanner where I just want to know if the corresponding address has an active device attached which sends me an aknowledge if I send its address. The main difference of my problem to the problem of the original post is: Since I faced this problems with I2C, I have removed all I2C devices from the bus. So there is no device attached to the I2C bus. I did it to verify wheter my scan runs through all addresses correctly or not. I assumed that one of the attached devices gets stuck and holds my SDA line low, but since no device is attached I thought this should not happen!? It seems that the I2C master of the PIC32 gets stuck and holds the SDA line low (and therefore generates the bus collission). The sequence, which was told in the original post, by setting the I2C pins to high state before enabling the I2C module did not help. Did anyone also face the same problem and has a hint or workaround for me? I'm working with a PIC32MX230F156D. I have attached a picture of the logic analyzer to show you what happens on the bus (remember: no device is attached to the bus).
Attached Image(s)
0