Reply To: Retrieving UART data on LCD using PIC16F877A

Home Forums Microcontrollers PIC Microcontroller Retrieving UART data on LCD using PIC16F877A Reply To: Retrieving UART data on LCD using PIC16F877A

#10784

sandeep
Participant

Hi sir,

As i copy data from RCREG to an array, i tried to convert the data to an ascii by adding 0x30 and 0x40 and print it on lcd. but i get

random alphabets and symbols which doesnt match with what i get it on hyperterminal.is that due to baud rate???

code used:

Lcd4_Clear();
Lcd4_Set_Cursor(1,0);
lcd4_putch((x[0]+0x30));  // if its giving unknown char ,add 0x40 to x[0] and try(HEX to ascii)
lcd4_putch((x[1]+0x30));
lcd4_putch((x[2]+0x30));
lcd4_putch((x[3]+0x30));

string(7) "9898001"