Reply To: LCD and UART PIC Microcontroller

Home Forums Microcontrollers PIC Microcontroller LCD and UART PIC Microcontroller Reply To: LCD and UART PIC Microcontroller

#10218
Ivan
Participant

Now I’m testing something new.

if(UART_Data_Ready()) 
{
  switch(UART_Read())
  {
    case 0x0D: // Enter
      Lcd_Clear();
      break;

    case 0x61:
      Lcd_Write_Char('a');
      break;

    default:
      Lcd_Write_Char(UART_Read());
      break;
}

When I press ‘a’ the letter is added automatically, or when when i press ‘Enter’ the lcd clears itself. but when I want add another letter a need to press twice. Do you know why?

Maybe I need do create a case for every letter.

>