[关闭]
@lanxinyuchs 2014-11-17T07:59:57.000000Z 字数 869 阅读 848

I2C说明

下图摘自NXP的SAA7144的手册,展现了I2C随机(任意地址)读/写的时序
I2C_procdure
其中ACK-s/ACK-m分别表示acknowledge generated by the slave/master
在写操作中,DATA传送完后slave器件内地址会默认自增,直到master产生stop信号。在读操作中,DATA传送完后若master产生了应答信号,则slave器件内地址自增,master不产生应答信号意味着master不再接收新的数据。

以下请参考附件TI_I2C.doc
Devices on the I2C bus only drive the bus lines LOW by connecting them to ground; they never drive the
bus lines HIGH. Instead, the bus wires are pulled HIGH by pullup resistors, so the bus wires are HIGH when no
device is driving them LOW.
The I2C bus is bidirectional: the SDA line is used both for transmitting and receiving data. When a master
reads from a slave, the slave drives the data line; when a master sends to a slave, the master drives the data
line.
Under normal circumstances the master drives the clock line.The slave acknowledges the byte by pulling
SDA LOW. The master then sends a clock pulse to clock the acknowledge bit.

SCL线一直由master控制,SDA由数据发送方控制。硬件上,SDA和SCL开漏上拉,因此idle状态是高电平,芯片管脚可以将其拉低,因此,有应答对应数据0,无应答对应数据1。

附件TI_I2C.doc

参考这篇文章

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注