i have a 8051 developing kit from robosoft labs which have different interfacing units like led's, 7seg, lcd,motor etc..
when i connect lcd (16*2) to the kit it dosent getting on.. lcd shows no light
here is the code
i have connected all data pins and control pins(rs, rw,en) to their correct position.. but still im not gettiong the lcd aty on position.. so i connected vcc and gnd to the lcd pins externally.. still not getting lcd on.. and i dont think that lcd is not working because i did replace 5 lcd with same procedure
plz help
when i connect lcd (16*2) to the kit it dosent getting on.. lcd shows no light
here is the code
Rich (BB code):
#include<reg51.h>
sbit rs=P1^0;
sbit rw=P1^1;
sbit en=P1^2;
unsigned int i,j;
void dat(unsigned char); //data fxn
void cmd(unsigned char); // command fxn
void main()
{
cmd(0x38); // display on cursor on
cmd(0x0E); // display on cursor blinking
cmd(0x06); // increment cursor to right
cmd(0x01); // clear display screen
cmd(0x80); // force cursor to start from first line first position
dat('h'); // data to data pins from p3
while(1); //hold
}
void cmd(unsigned char x)
{
P3=x;
rs=0; //indicating command
rw=0;
en=1;
for(i=0;i<5000;i++); //delay
en=0;
}
void dat(unsigned char y)
{
P3=y;
rs=1; // indicating data
rw=0;
en=1;
for(i=0;i<5000;i++);
en=0;
}
i have connected all data pins and control pins(rs, rw,en) to their correct position.. but still im not gettiong the lcd aty on position.. so i connected vcc and gnd to the lcd pins externally.. still not getting lcd on.. and i dont think that lcd is not working because i did replace 5 lcd with same procedure
plz help
Last edited by a moderator: