您好,即使I2C控制器使用端口引脚,您也可以一直读取通用I/O端口寄存器。设置I2CxCON.ON=1;/*I2C控制器现在将控制SDAx和SCLx引脚。*/…I2CXCON.ON=0;/*IO引脚现在由IO端口寄存器控制。*/请注意,NXP在I2C文档中精心设计和指定了“开路漏极”驱动器,以避免I2C信号线上出现任何可能的短路情况。如果禁用I2C控制器并将管脚驱动到高逻辑电平,则会破坏I2C信号规则,如上面的rodims所解释的I2C规范在NXP网站上:Mysil NXP.COM/Dopunts/UsRyMualAl/UM10204.PDF,
以上来自于百度翻译
以下为原文
Hi,
You can always Read the general I/O Port register even when I2C controller is using the port pins.
Set
I2CxCON.ON = 1; /* I2C controller will now control SDAx and SCLx pins. */
...
I2CxCON.ON = 0; /* IO pins are now controlled by IO port registers. */
Be aware that the "open drain" drivers are carefully designed and specified in I2C document by NXP,
in order to avoid any possible short circuit condition on I2C signal lines.
If you disable I2C controller and drive the pin to High logic level, you break I2C signalling rules,
as rodims explain above.
I2C specification is on NXP website: www.
nxp.com/documents/user_manual/UM10204.pdf
Regards,
Mysil
您好,即使I2C控制器使用端口引脚,您也可以一直读取通用I/O端口寄存器。设置I2CxCON.ON=1;/*I2C控制器现在将控制SDAx和SCLx引脚。*/…I2CXCON.ON=0;/*IO引脚现在由IO端口寄存器控制。*/请注意,NXP在I2C文档中精心设计和指定了“开路漏极”驱动器,以避免I2C信号线上出现任何可能的短路情况。如果禁用I2C控制器并将管脚驱动到高逻辑电平,则会破坏I2C信号规则,如上面的rodims所解释的I2C规范在NXP网站上:Mysil NXP.COM/Dopunts/UsRyMualAl/UM10204.PDF,
以上来自于百度翻译
以下为原文
Hi,
You can always Read the general I/O Port register even when I2C controller is using the port pins.
Set
I2CxCON.ON = 1; /* I2C controller will now control SDAx and SCLx pins. */
...
I2CxCON.ON = 0; /* IO pins are now controlled by IO port registers. */
Be aware that the "open drain" drivers are carefully designed and specified in I2C document by NXP,
in order to avoid any possible short circuit condition on I2C signal lines.
If you disable I2C controller and drive the pin to High logic level, you break I2C signalling rules,
as rodims explain above.
I2C specification is on NXP website: www.
nxp.com/documents/user_manual/UM10204.pdf
Regards,
Mysil
举报