Hello to all! Has anyone ever had any problems displaying the 2nd row on a Cytron LCD 8x2 display? I can't find any pertinent information on their website. The display is wired correctly to an Arduino Uno because I've had no problem with a generic LCD 16x1 display and the Arduino LiquidCrystal library. Both displays have the same pinout. I've also tried the lcd.begin() with different screen sizes but the only one that works is lcd.begin(16, 1)... on a 8x2 display! If someone has any ideas, I'd gladly check them out. Thank you!
ptk:
. . . but the only one that works is lcd.begin(16, 1)... on a 8x2 display! If someone has any ideas, I'd gladly check them out. Thank you!
That's because the memory for most 16x1 displays is actually configured as if it were an 8x2 display!
For more information go to Don's Collected Technical Information and click on the LCD Addressing link. Then scroll down to the 16x1 (Type 1) section.
Don
floresta:
That's because the memory for most 16x1 displays is actually configured as if it were an 8x2 display!For more information go to Don's Collected Technical Information and click on the LCD Addressing link. Then scroll down to the 16x1 (Type 1) section.
Don
floresta:
That's because the memory for most 16x1 displays is actually configured as if it were an 8x2 display!
But then why would his 8x2 not work as expected?
He seems to be having the opposite of the typical problem of a 16x1 type 1 display issue.
Does he have a 8x2 display that is wired up as a 16x1 type 2 display?
(The default offset table in LiquidCrystal for 16x1 display uses the memory addresses for type 2)
--- bill
ptk,
Can you describe what you mean by:
"... problems displaying the 2nd row on a Cytron LCD 8x2 display?"
Show us the code and then tell us what you getting on the display vs what are you expecting.
--- bill
We should be able to figure out what is happening if he feeds it 80 consecutive displayable characters without attempting any cursor positioning.
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // put your pin numbers here
void setup()
{
lcd.begin(16, 2); // this shouldn't matter if we don't try cursor positioning
for (char i=47; i<127; i++) // send 80 consecutive displayable characters to the LCD
{
lcd.print(i);
delay(100); // this delay allows you to observe the addressing sequence
}
}
void loop()
{
}
Don
Bill: At some point I think you had some comments about this sketch but I can't seem to find them right now.
floresta:
Bill: At some point I think you had some comments about this sketch but I can't seem to find them right now.
The sketch looks ok to me, other than it will need to include the LiquidCrystal header file.
#include <LiquidCrystal.h>
--- bill
post update:
I guess it might make a difference if number of lines is 1 vs more than 1 as that can affect the internal mode and contrast of the pixels.
--- bill
Hello to all! I'd like to first start by letting you know that the Cytron LCD 8x2 display's part number is DS-LCD-082A, in case someone was wondering. The information here was very useful and I'll be sure to update my bookmarks accordingly (thanks, floresta!). I've uploaded the test code and got no display whatsoever... However, when changing the code from lcd.begin(16,2);
to lcd.begin(16,1);
, the display then showed "/01234567" on the first line... nothing on the 2nd line, unfortunately. By the way, changing it to lcd.begin(8, 2);
also displayed nothing... Sorry, any other ideas? Thank you very much for any other suggestions!
"/01234567" is more than 8 characters.
I'm confused.
note: When you go from 1 line to more than 1 line, you will likely have to readjust the contrast pot.
It could be that the characters are there when you set it to 2 lines but you can't see them.
--- bill
Oops! Sorry about that! Of course, I meant to write "/0123456" and not "/01234567"! Adjusting the contrast pot didn't work either... The "/0123456" just got darker, then showed the 1st line with only black boxes and upon adjusting the contrast pot a little further, got the 2nd row to also only show black boxes... Thank you very much for any other suggestions!
But what happened when you adjusted the pot when the lines were set to 2?
That is what I was asking about.
Eureka! This code: lcd.begin(8, 2);
works correctly! And I foolishly thought that the pot setting should stay the same with this line of code: lcd.begin(16,1);
I guess I had read your note a little too quickly and had not connected the right neurones in my brain! Thank you so much for asking me (again) about the pot adjustment and leading me to the answer! Works great and thanks again to everyone's ideas concerning this request!