void EEPROMWRITE(void)
{
uint8 i,s=0;
for(s=0;s<receCount-4;s++)
{
buf1[s]=receBuf[s+2];
}
EEPROM_WRITE(0x20,buf1);
delayms(200);
s=0;
EEPROM_READ(0x20,buf2);
delayms(100);
sendBuf[0]=buf1[0];
sendBuf[1]=buf1[1];
sendBuf[2]=buf1[2];
sendBuf[3]=buf1[3];
sendCount = 4;
beginSend();
}
简单的程序,串口接收发送用中断,不加在协议里,那出来单独用就没问题,正常读写,加在协议里之后,通过查看EEPROM数据发现只能在0x20和0x21里写进去,后2位数据没写进去。而且最后没有串口数据输出 恼死了!~ |