Thanks for another response Bassa,
I have tried interrupts but same problem.
I am able to receive serial data but the wrong one. Gettting dummy characters rather than receiving NMEA data.
The value read from in SBUF seems incorrect.
thanks
Added after 1 minutes:
Do you think that the problem may be with the baud rate?
Changing the baud rate changes the values on LCD.
thanks
Added after 17 minutes:
It ought to be the issue,
when I change the baud rate on pc, similar things happen.
I have tried keil baud rate generator
https://www.keil.com/products/c51/baudrate.asp but things dont seem to get working.
thanks
Added after 17 minutes:
I finally got it working!!!!!!
thank you all!
it was the baud rate that I was struggling with.
thanks again, the problem is resolved now