#inclu de #inclu de"stc11reg
h" #inclu de"u art
h" #inclu de"Init
h" #inclu de"eeprom
h" #define IAP_ADDRESS1 0x 0000 #define IAP_ADDRESS2 0x 0100 #define IAP_ADDRESS3 0x 0200 #define IAP_ADDRESS4 0x 0300 #define IAP_ADDRESS5 0x 03F0 //EEPROM 扇区划分 u int Rec_Flag=0; //解析状态标志 u char Rec_len;//接收数据长度值寄存器 u char length;//数据长度变量 u char ok=0x ff;//擦除正确返回字节 u char error=0x ee;//擦除不成功返回字节 u char tail=0x ee; //帧尾字节 u char rcv dat;//串口接收数据寄存器 u char Addr;//地址识别中间变量 u int Address;//地址变量 bit read_flag=0; //串口接收完毕标志位 bit OK_flag1=0; bit OK_flag2=0; //擦除成功判断标志位 bit order_read; //读取命令标志位 bit order_sav e; //存储命令标志位 bit order_eraser; //擦出命令标志位 //串口接收中断函数 /******************************************************************************************** 数据读取帧:0x aa 0x ab 0x aa 0x ab 0x 00 0x 0a 0x 01 数据包类型 0x ee