who has the i2c program of p89c669 ?Please send me a copy!thanks a lot!my e-mail adrress is railyangjin@yahoo.com.cn i have do it for several days,but i can't solve the problem.this is my program: #include <reg669.h> #include <absacc.h> sbit P1_4=P1^4; //************************************** void int_i2c() { I2CLL=250; //设置I2C的波特率 I2CLH=0; EI2C=1; //I2C中断允许位 } //************************************** void GetBus() { P1=0xC0; I2CON=0xc4; //I2EN=1 STA=0 STO=0 SI=0 AA=1 int_i2c(); I2CON=0xe4; // STA=1 while(I2CON&0x08==0);//等待起始位的发送 } //*************************************** void SendByte(unsigned char c) { I2DAT=c; //I2CON=I2CON&0x0f7; I2CON=0xc4; //SI=0 清除SI 位等等 while(I2CON&0x08==0);//等待数据的发送 } //*************************************** bit write_fm31256() { GetBus(); if(I2STA!=0x08){I2CON=0xD4;return(0);} SendByte(0xa0); //slave adress(ramtron's fm32256) if(I2STA!=0x18){I2CON=0xD4;return(0);}SendByte(0x00); if(I2STA!=0x28){I2CON=0xD4;return(0);}SendByte(0x00); if(I2STA!=0x28){I2CON=0xD4;return(0); SendByte(0x02); if(I2STA!=0x28){I2CON=0xD4;return(0);}I2CON=0xD4; return(1); } //************************************ void main() { P1_4=1; EI2C=0; write_fm31256(); tt=write_fm31256(); if(tt) P1_4=0; } but the output of P1.4 is 1,it also means the write opration is fail.