Microcontroller › 8051 › help with LCD(16×2) display code using 8051 › try this initialization
January 7, 2013 at 10:04 am
#8912
BHARATH.S.HEGDE
Participant
try this initialization function……..
//lcd initialisation //
void lcd_init()
{
lcd_cmd(0x0e); //lcd on, cursor on
delay(2);
lcd_cmd(0x38); //8 bit initialize, 5×7 character font, 16×2 display
delay(2);
lcd_cmd(0x06); //right shift cursor automatically after each character is displayed
delay(2);
lcd_cmd(0x01); //clear lcd
delay(2);
lcd_cmd(0xC0);
delay(2);
}