void delay(unsigned int ms) //This I have added you may use your own delay
{
int i , j
for(i=0 ; i<ms ; i++)
{
for(j = 0 ; j<1275 ; j++);
}
}void LCD_init()
{
lcdcmd(0x38); // Initialize 2 lines 5*7
lcdcmd(0x0C ) ; //Cursor OFF
lcdcmd(0x01) ;
lcdcmd(0x06) ;
lcdcmd(0x80) ;
}
void lcddata(unisgned char data)
{ ladata = data ; RS = 1 ; RW = 0 ; EN = 1 ; delay(5) ; EN = 0 ;}
void lcdcmd(unsigned char cmd)
{ ldata = data ; RS = 0 ; RW = 0 ; EN =1 ; delay(5) ; EN = 0 ; }
void main()
{
ladta = 0x00 ; // Making the PORT as Output which is connected with Data Lines of LCD
//rs = 1 ; rw = 1 ; en = 1 ;
// Also make the pins as OUTPUT which are connected to RS , RW and Enable Pins
LCD_init() ;
delay(1000);
lcddata('A'); delay(100); lcddata('B');
}