基于STC单片机的虚拟IIC软件包(改自周立功软件包) #include #include #define uchar unsigned char /*宏定义*/ #define uint unsigned int extern void Delay1us(unsigned char ); sbit SDA=P1^6; /*模拟I2C数据传送位*/ sbit SCL=P1^7; /*模拟I2C时钟控制位*/ bit ack; /*应答标志位*/