It would be very helpfull if you could post your code with comments explaining the steps taken by you.
I assume you are using LCD in 4-bit mode. If so, initialize the LCD in 4-bit mode with command 0x02.
I have faced problems using KEIL while using ” #define LCD P0;”. Instead i’ve used “sfr P0=LCD;”.
Hope you solve your problem,