这种扩展器具有1个2线I2C通信总线,可与双向数据传输的I2C主机接口。I2C总线由2条信号线和1条地线组成。信号线是双向串行数据(SDA)线和双向串行时钟(SCL)线(见图1)。SDA和SCL线经上拉电阻连接正电源电压。在总线闲置时,这两条信号线上拉为高态。
<img src="attachments/dvbbs/2004-12/200412492819479.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2004-12/200412492819479.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /></P>
<>图1 I2C总线器件通过双向SDA和SCL线连接到I2C总线上</P>
<>
</P>
<P><img src="attachments/dvbbs/2004-12/20041249306975.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2004-12/20041249306975.jpg\');}" onmousewheel="return imgzoom(this);" alt="" /></P>
<P>图2 用PCF8574和PCF8574A实现I/O扩展的电路
连接到I2C总线上的每个器件,根据其功能都具有自己的专门地址,每个器件可做为接收器或发送器。可配置扩展器具有专门的7位地址。PCF8574 7位地址的前4位是0100,而PCF8574A是0111。低3位地址由器件引脚A2、A1、A0设置。因此,器件的完整的专门地址由A2、A1和A0设置。表1示出PCF8574和PCF8574A专门地址的各种可能设置。