Thank you. it does work. But i try to move on using the library for USART. It failed. I follow exactly as they said in the microC but not success. Can you help
Code:
unsigned short i;
void main() {
// Initialize USART module (8 bit, 2400 baud rate, no parity bit..)
UART_Init(2400);
do {
if (UART_Data_Ready()) { // If data is received
i = UART_Read(); // Read the received data
UART_Write(i); // Send data via USART
{
} while (1);
}
Here below is the error code
0 125 All files Preprocessed in 16 ms
0 121 Compilation Started X-BAND Serial.c
4 324 Undeclared identifier 'UART_Init' in expression X-BAND Serial.c
6 324 Undeclared identifier 'UART_Data_Ready' in expression X-BAND Serial.c
6 309 Invalid statement X-BAND Serial.c
7 324 Undeclared identifier 'UART_Read' in expression X-BAND Serial.c
8 324 Undeclared identifier 'UART_Write' in expression X-BAND Serial.c
12 315 Invalid expression X-BAND Serial.c
11 400 ; expected, but '' found X-BAND Serial.c
12 422 '}' expected '' found X-BAND Serial.c
12 409 while expected, but '' found X-BAND Serial.c
12 403 '(' expected, but '' found X-BAND Serial.c
12 315 Invalid expression X-BAND Serial.c
12 404 ')' expected, but '' found X-BAND Serial.c
12 400 ; expected, but '' found X-BAND Serial.c
12 422 '}' expected '' found X-BAND Serial.c
0 102 Finished (with errors): 05 Jan 2011, 14:57:33 X-BAND Serial.mcppi