HOW TO SEE UART DATA FOR PIC (PIC18F4550) IN PROTEUS USING MIKRO C




DOWNLOAD FILES
NOTES
  • COMPILER - MIKRO C PRO 6.6.1
  • SIMULATOR -PROTEUS 8.1
PROGRAM
char uart_rd;
void main()
{
UART1_Init(9600);               // Initialize UART module at 9600 bps
Delay_ms(100);                  // Wait for UART module to stabilize

UART1_Write_Text("HIII");
UART1_Write(0XD); //NEW LINE

while (1) // Endless loop
{
if (UART1_Data_Ready()) {     // If data is received,
uart_rd = UART1_Read();     // read the received data,
UART1_Write(uart_rd);       // and send data via UART
UART1_Write(0XD); //NEW LINE
}
  }
}