Microcontroller › 8051 › help with LCD(16×2) display code using 8051 › Hi Mahruh,Dont write anything
January 8, 2013 at 11:25 am
#8919
AJISH ALFRED
Participant
Hi Mahruh,
Dont write anything inside the initialization function.
Use the command for the display on second line only when you require.
like this,
void lcd_ini() //Function to inisialize the LCD
{
lcd_command(0x38);
delay(5);
lcd_command(0x0F);
delay(5);
lcd_command(0x80);
delay(5);
}
void main()
{
lcd_ini();
lcd_dataa("ECE Rocks");
lcd_command(0xC0); //command for display on second line
lcd_dataa("2013");
delay(2000);
lcd_command(0x80); //command for back to first line
lcd_dataa("Rocks again")
}