Projects › Projects › 4bit lcd program for 2148…..i am getting perfectly output in kiel but in proteus nothing is displaying on lcd..can you tell me › Hi,The initial commands for
The initial commands for the 4 bit interfacoing should be something like the following; don’t forget to add some delay after all the commands.
lcd_cmd ( 0x02 ); // to initialize LCD in 4-bit mode.
lcd_cmd ( 0x28 ); //to initialize LCD in 2 lines, 5X7 dots and 4bit mode.
lcd_cmd ( 0x0C );
lcd_cmd ( 0x06 );
lcd_cmd ( 0x80 );
lcd_cmd ( 0x01 );
delay_ms ( 500 );
Check your circuit connections also, use a variable resistor with the contrast pin of the LCD to adjust the contrast and also use a resistance in series with 15 th or 16 th pin to adjust the backlight.
Suggest you to leave the simulating software and try it on the real hardware, because one day you have to do the project in the hardware and then you will find that you were actually wasting your time with the simulating softwares.