#include #include #define uint unsigned int #define uchar unsigned char unsigned char sec; //定义计数值,每过1秒,sec加1 unsigned int tcnt; //定时中断次数 bit write=0; //写24C08的标志; sbit sda=P2^0; //IO口定义 sbit scl=P2^1;