Professional Documents
Culture Documents
Como Conectar Max232
Como Conectar Max232
The example demonstrates simple data exchange via USART. When PIC MCU receives
data, it immediately sends the same data back. If PIC is connected to the PC (see the figure
below), you can test the example from mikroC terminal for RS232 communication, menu
choice Tools › Terminal.
unsigned short i;
void main() {
do {
if (Usart_Data_Ready()) { // If data is received
i = Usart_Read(); // Read the received data
Usart_Write(i); // Send data via USART
}
} while (1);
}//~!
HW Connection
RS232 HW connection