EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / Well, in theory that is the

Well, in theory that is the

|

Microcontroller › 8051 › 16×2 LCD Skipping Alphabetic Letters (b,d,f,h,j etc.) – AT89C5131A › Well, in theory that is the

December 21, 2012 at 8:50 pm #8870
guyd
Participant

Well, in theory that is the problem…

but for some reason, the problem still extist.

 

the code:

 

 

//Program to display String on LCD

#include<reg52.h>

#define lcd_data_pin P2

sbit rs=P3^0; // Register select pin
sbit rw=P3^1; // Read write pin
sbit en=P3^2; // Enable pin
void delay(unsigned int msec)    //delay function
{
int i,j;
for(i=0;i<msec;i++)
for(j=0;j<1275;j++);
}
void lcd_command(unsigned char comm) // function to send command to LCD
{
lcd_data_pin=comm;
en=1;
rs=0;
rw=0;
delay(1);
en=0;
}
void lcd_data(unsigned char disp)    // function to send data on LCD
{
lcd_data_pin=disp;
en=1;
rs=1;
rw=0;
delay(20);
en=0;
}

lcd_dataa(unsigned char *disp)    // function to send string to LCD
{
int x;
for(x=0;disp[x]!=0;x++)
{
lcd_data(disp[x]);

}
}

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()
{
while(1){
lcd_ini();
lcd_dataa(“A B :a;a”);

}
}

 

 

Result: LCD Displays “A!C!;a;a”

RSS feed: Recent Posts Recent Posts

  • How much does generator frequency stability matter for sensitive electrical equipment? September 16, 2026
  • dosen't work as planned September 16, 2026
  • Schematic help, odd symbol September 16, 2026
  • XC9235A33CMR-G Semi conductor September 15, 2026
  • Earth Ground Question September 14, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Arrowfly
Privacy Policy | Advertising

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise