Home › Forums › Microcontrollers › PIC Microcontroller › LCD and UART PIC Microcontroller › Reply To: LCD and UART PIC Microcontroller
December 9, 2014 at 2:09 pm
#10168
Keymaster
Hello,
Use this program :
void main()
{
TRISB = 0b000000110;
TRISA0 = 0;
Lcd_Init();
Lcd_Clear();
Lcd_Set_Cursor(1,1);
Lcd_Write_String("WAITING...");
UART_Init(9600);
UART_Write_Text("Terminal is running!");
Lcd_Set_Cursor(2,1);
while(1)
{
if(UART_Data_Ready())
{
RA0 = 1;
Lcd_Write_Char(UART_Read());
__delay_ms(300);
}
}
}
