The problem is when I start the uart_interrupt to get user input from keyboard, I found that the web server will be slow down and even stop echoing our request. If I disable the uart_interrupt, the web server works well again. It is strange that I didn't do anything special in our UART ISR. Hopes you can help me void uart_interrupt (void) small interrupt 4 using 0 /* ------------------------------------------------------------------------ -- * Purpose : Interrupt function. Save received char in buffer. * Remarks : interrupt "4": seriel port interrupt, using cpu internal mem. bank "2" * Restrictions: * See also : * Example : * ************************************************************************ */ { unsigned char ch; int i; // GPIO_LED = 0;//Light on LED P3RxD = 1; //Force pull high //<<<<<< ES = 0; EA = 0; if (RI) {/**************** Second problem ******************/ RI = 0; /* save any framing error */ if (SM0) { // uart_framing_error = TRUE; SM0 = 0; } ch = SBUF; rx_buf[rx_head] = ch;//save into ring buffer rx_head = (rx_head + 1) & (RX_BUF_SIZE - 1); } P3TxD = 1; //Force pull high //<<<<<< EA = 1; ES = 1; }
thanks your reply for all guys, it's useful to me^_^ especially thx to Mr.V K because the flag TI is what the problem is. Thank you and see you all later ^_^ Ken