Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

16 x 1 LCD Display

Status
Not open for further replies.

premkumar9

Member
Hi,
I used a 16x1 LCD display. When supply and ground is given and contrast is varied, then contrast of first 8 characters varied. Other characters remained in min contrast. When I tried to display some characters with a program, then also only first 8 worked. Then I thought it is a defective piece. But when I tried some other program, I have seen the other characters also working. What can be the probable reason? Can I conclude that it is a problem with my program? If so why only first 8 characters changed with contrast control? Can anybody help?
 
hi,
On some LCD displays the first 8 character locations and the second 8 locations have be addresses separately.

Assume its a 2 line by 16 character LCD

Use the first line address for 1 to 7 [ on mine its 80h]
and the second line address for 8 to 16 [ and 90h]

If you cannot locate the address, do the following test.

Start writing the 'alphabet' characters from the first location and write to the LCD say, a total of 100 characters.
You should be able to determine what the address of the locations 8 to 16 is.

Do you follow.?:)
Look here:
**broken link removed**

EDIT:

Section: 2.3.1.1
Table 2.5 the notes just below the table.
 
Last edited:
hi,
On some LCD displays the first 8 character locations and the second 8 locations have be addresses separately.

Assume its a 2 line by 16 character LCD

Use the first line address for 1 to 7 [ on mine its 80h]
and the second line address for 8 to 16 [ and 90h]

If you cannot locate the address, do the following test.

Start writing the 'alphabet' characters from the first location and write to the LCD say, a total of 100 characters.
You should be able to determine what the address of the locations 8 to 16 is.

Do you follow.?:)
My program for positioning the cursor is as below
void lcdxy(unsigned char x, unsigned char y)// to position the cursor at column and line
{

unsigned char cmd;
y = y - 1;
x = x - 1;
cmd = 0x80 + x+0x40 * y;
write_lcd_cmd(cmd);
}

since the first 8 characters are displayed I can assume that the start point is correct. From that shall i write a long string and see what is displayed in 9th position onwards? Is this what you meant?
 
My program for positioning the cursor is as below
void lcdxy(unsigned char x, unsigned char y)// to position the cursor at column and line
{

unsigned char cmd;
y = y - 1;
x = x - 1;
cmd = 0x80 + x+0x40 * y;
write_lcd_cmd(cmd);
}

since the first 8 characters are displayed I can assume that the start point is correct. From that shall i write a long string and see what is displayed in 9th position onwards? Is this what you meant?

hi,
Thats what I would try.

Did you read the link I posted in my EDIT on the last post.?
 
hi,
Thats what I would try.

Did you read the link I posted in my EDIT on the last post.?

I gave a long string. Still the first 8 characters alone displayed. Anyway let me try for some more time. But when I gave supply, gnd and contrast, only first 8 characters are responding. I think all should respond. Is it not?
 
My program for positioning the cursor is as below
void lcdxy(unsigned char x, unsigned char y)// to position the cursor at column and line
{

unsigned char cmd;
y = y - 1;
x = x - 1;
cmd = 0x80 + x+0x40 * y;
write_lcd_cmd(cmd);
}

since the first 8 characters are displayed I can assume that the start point is correct. From that shall i write a long string and see what is displayed in 9th position onwards? Is this what you meant?

This code should work correctly provided that you setup the display as a two line display. Do you send command 0x28 (or 0x38 if 8 bit interface)?

Mike.
 
This code should work correctly provided that you setup the display as a two line display. Do you send command 0x28 (or 0x38 if 8 bit interface)?

Mike.

It was as 1 line (command 0x30). Now changed to 0x38. Still same problem continues. I doubt whether this is a defective piece since 8 to 16 didn't change with contrast (when supply alone is given) while 0 to 7 became black boxes.
 
It was as 1 line (command 0x30). Now changed to 0x38. Still same problem continues. I doubt whether this is a defective piece since 8 to 16 didn't change with contrast (when supply alone is given) while 0 to 7 became black boxes.

Is it possible to read the ic numbers on the display pcb,, is there a HD44780 or HD44100H ic on the pcb.??
 

Attachments

  • lion_2004111714242025309848.doc
    278.5 KB · Views: 766
  • datasheet(2).pdf
    546.1 KB · Views: 486
Last edited:
That reply will be completely useless to anyone with the same problem in the future. Why not take the time to explain what was causing your problem.

Mike.

True. I could solve it at night and thought I will send the details in the morning. When blueroomelectronis suggested to use it as 8x2 I tried to write in 2 lines but forgot to initialize for two lines by sending 0x38. later when ericgibbs suggested to send a long string I tried to send a long string in a single line. Then you suggested correct initialization (for 2 lines) I did so, but continued to write in one line (forgot to change).
Finally when initialization and writing were corrected for 2 lines, it worked. Is it clear?
 
Thank you all

Thank you all once again for the guidance. Otherwise I would not have solved this problem this fast as I am not very familiar with using LCD displays. Now this forum gives me lot of confidence to take up any new development projects.
 
Status
Not open for further replies.

Latest threads

Back
Top