interrupt VectorNumber_Vsci1rx void isrSCI1(void) { byte temp; temp = SCI1S1; LedFlash = ~LedFlash; if (SCI1S1_RDRF) { COMM_BUF = SCI1D; RD_FLAG = YES; } } /*串口1初始化*/ void SCI1_Init(void) { SCI1BD = (BUSCLK/BandRate/16); //bandrate SCI1C1 = 0x00; //8bit SCI1C2 = 0x2C; //允许接收中断,接收和发送允许 SCI1C3 = 0x00; } 主程序里已经 EnableInterrupts;用串口调试助手调试,波特率是对的,因为发送是正确的。然后依然用串口调试助手调试接收,进不去串口接收中断,而定时器溢出中断是正常的,这是怎么回事呢?谢谢 |