原创 I2C的应答和非应答,如何理解?

2007-11-27 13:05 7177 3 4 分类: MCU/ 嵌入式

A:应答是I2C非常重要的机制,是不一定要弄清。它在工作中涉及的范围包括总线仲裁(多主)、正常的数据通信。这个问题在常见总线里是比较特别的,应当深入详细地了解。让我们先整理一下这个问题。


1 确认应答和非应答的定义和解释:



应答:是一个低电平信号。
非应答:是一个高电平信号,也许,叫做应答非更合适。
两个信号的明显不同是来源不同。应答信号是当前从器件发出的,而非应答信号是由当前主器件发出,再者方向是相反的。
应答或非答的时钟,都由当前主器件发生。
(这句出自何立民的《I2C总线应用系统设计》…………)原述:“应答信号在第9个时钟上出现,接收器输出低电平为应答信号(A),输出高电平则为非应答信号(/A)”,“由于某种原因,被控器不产生应答时,如被控器正在进行其它处理无法接收总线上的数据时,必须释放总线,将数据线置高电平,然后主控器可通过产生一个停止信号信号来比终止数据传输。”“当主控器接收数据时接收到最后一个数据字节后,必须给被控器发送一个非应答位(/A),使被控器发送器释放数据线,以便主控制(注:应当是主控器,不是主控制)发送停止信号从而终止数据传输。” 


  


 


点击看大图


图1 pic.gifI2C应答规则.gif


 点击看大图


图2 pic.gifI2C应答与非应答.gif


( by iC921@2006.03.18 -原创-) 编辑中,请不要回复


 


 


 


 


 


SPI核心特性pdf.gifSPI Core Specifications simple_spi.pdf


Philips I2C站点www.semiconductors.philips.com/i2c


 


 


I2C规范中关于应答的内容


7.2 Acknowledge


Data transfer with acknowledge is obligatory. The acknowledge-related clock pulse is generated by the master. The transmitter releases the SDA line (HIGH) during the acknowledge clock pulse.


The receiver must pull down the SDA line during the acknowledge clock pulse so that it remains stable LOW during the HIGH period of this clock pulse (see Fig.7). Of course, set-up and hold times (specified in Section 15) must also be taken into account.


Usually, a receiver which has been addressed is obliged to generate an acknowledge after each byte has been received, except when the message starts with a CBUS address (see Section 10.1.3).


When a slave doesn’t acknowledge the slave address (for example, it’s unable to receive or transmit because it’s performing some real-time function), the data line must be left HIGH by the slave. The master can then generate either a STOP condition to abort the transfer, or a repeated START condition to start a new transfer.


If a slave-receiver does acknowledge the slave address but, some time later in the transfer cannot receive any more data bytes, the master must again abort the transfer. This is indicated by the slave generating the not-acknowledge on the first byte to follow. The slave leaves the data line HIGH and the master generates a STOP or a repeated START condition.


If a master-receiver is involved in a transfer, it must signal the end of data to the slave- transmitter by not generatingan acknowledge on the last byte that was clocked out of the slave. The slave-transmitter must release the data line to allow the master to generate a STOP or repeated START condition.

PARTNER CONTENT

文章评论1条评论)

登录后参与讨论

用户377235 2014-11-22 19:53

游客身份也能发表评论啊
相关推荐阅读
用户725579 2007-12-17 15:55
高速电路设计中,走线的等长、关键信号的阻抗控制、差分走线的设置
摘要:本文首先简述了高性能ARM9微处理器EP9315集成的外设接口及硬件结构框架,提出了当前高速电路设计中的问题;然后,详细介绍了利用Allegro实现嵌入式系统中SDRAM和IDE总线接口的电路设...
用户725579 2007-12-17 15:52
PCB设计技巧百问(合集)
PCB设计技巧百问(合集) 2007/11/11 23:491、如何选择PCB板材? 选择PCB板材必须在满足设计需求和可量产性及成本中间取得平衡点。设计需求包含电气和机构这两部分。通常在设计非常高速...
用户725579 2007-11-27 17:34
阅读理解:关于SPI驱动
关于IIC驱动,本论坛已经有深入的讨论研究了,例如:http://www.hhcn.com/cgi-bin/topic.cgi?forum=1&topic=148&show=0因为II...
用户725579 2007-11-27 17:33
printk 实现分析
一直都不清楚是怎么被定位到串口的,所以也非常想搞明白,因为以后可能把标准输入输出还原到键盘和显示器上去,所以决心自己再读一读源码了。不过内核用的打印函数printk完全是和stdin或stdout无关...
用户725579 2007-11-27 16:21
好的网站
http://www.cublog.cn/u/3063/article_4349.htmlhttp://www.gelato.unsw.edu.au/lxr/source/drivers/media/...
用户725579 2007-11-27 16:09
linux2.6的IIC驱动编写
目录:1.四种模式的IIC驱动编写介绍2.一个完整的IIC驱动(从器件接收模式,并且是裸写驱动)1.1 开启从器件接收模式的示例R_IICCON = 0xE2; // 使能ACK,使能中断R_IICA...
EE直播间
更多
我要评论
1
3
关闭 站长推荐上一条 /3 下一条