interfacing lcd with 8051 microcontrollers

Status
Not open for further replies.

TOCHI

Newbie level 5
Joined
Oct 11, 2013
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
85
pls, i need held help on using keil compiler for c to write a code to display information on LCD, pls i need urgent help.
I am using 89s52 microcontroller and my code is shown below:

Code:
#include <reg52.h>
#include <stdio.h>

#define LCDData P1 //LCDData declaration

sbit En=P2^0; //the enable pin
void main(void)
{
unsigned char message[] = “The Earth is but One Country”;
unsigned char z;
for (z=0;z<28;z++) //send 28 characters
    {
LCDData=message[z];
En=1; //a high-
En=0; //-to-low pulse to latch data
    }
}


how do i control the RW, RS and E pins of the LCD?
pls, include diagram and code.
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…