用的是MC9S08AW60,RS232使用时遇到一个问题,请教各位大侠/ 用串口调试助手,200ms周期自动发送3个字节时,会影响到程序的正常运行,会修改一些data buffer的值,不知大家有没有遇到过这种情况。谢谢! 初始化程序: /*Initial SCI2*/ SCI2BD = 0x34; //fbus/(16*52)=9600bps SCI2C1 = 0x00; //1bit start;8bit data;1bit stop;no parity SCI2C2 = 0x2C; //transmit interrupt disable;receive interrupt enable SCI2C3 = 0x00; //default value 接收中断: __interrupt void isrVsci2rx(void) { byte Temp;
Temp = SCI2S1; // Acknowledge Receiver Full Flag
SCI2S1_RDRF = 1; Temp = SCI2D;
ScirxBuffer[ReceCount]=Temp; //3.31add wang ReceCount++; //3.31add wang } |