I'm connecting it as as specified in the Arduino tutorial web (using only DB4-DB7 + RS + E), and I can succesfully write in the first raw if I define it as "lcd.begin(8, 1)". If I specify define as "lcd.begin(8, 2)", is not only not writing in the second row but neither in the first one, so nothing is writed at all.
I really need to use the second row, so please anybody can help me with that?
Thank you
I forget whether the solution is to define it as (16,1) and just keep writing after the first 8 characters or what, but you do need to check that you are using the proper fmalpartida library.
I already tried using (16, 1) or switching between the standard LCD library and the one from fmalpartida, but I still get the same result; when I define with only one row, I can use the first row without problem, but when I define 2 rows, I can't use neither the first or the second.
The data sheet looks like it has pretty much the same content as all of the others so there is no reason that it shouldn't work if you use the standard LiquidCrystal library.
Try it with this version of 'Hello World' and see what happens.
#include <LiquidCrystal.h>
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); // put your pin numbers here
void setup()
{
lcd.begin(8, 2); // put your LCD parameters here
lcd.print("hello,");
lcd.setCursor(0,1);
lcd.print("world!");
}
void loop()
{
}
I tried your code but is not working neither. The problem is the same; upper row works with lcd.begin(8, 1) but nothing works with lcd.begin(8, 2).
I really don't understand why is not working; I've been working with many other LCD in the past, 16x2 and 20x4 mostly, and they always worked without much problems.
Let's try a different approach without the cursor positioning. This sketch will send 80 consecutive displayable characters to the LCD controller which will fill up it's RAM. Therefore every location on your display should display something.
Make sure you let run for a while since the delay will cause it to take several seconds to fill the RAM.
#include <LiquidCrystal.h>
//LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // put your pin numbers here
void setup()
{
lcd.begin(8,2); // put your LCD parameters here
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()
{
}
I got it working this time . After uploading the program from floresta, I realized that the lcd was showing characters by looking at the reflex, in both lines, but not printed in black. I adjust againt the potenciometer I have in the adjust tension and letters appeared :D. Is weird, because the previous value it was good to print only the upper row but not enough to print the second one ... After, applying this very quick'n'dirty program:
#include <LiquidCrystal.h>
//LiquidCrystal lcd(rs,en,d4,d5,d6,d7);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // put your pin numbers here
void setup()
{
lcd.begin(8,2); // put your LCD parameters here
// 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
// }
lcd.print("11111111");
lcd.print("22222222");
lcd.print("33333333");
lcd.print("44444444");
lcd.print("55555555");
lcd.print("66666666");
}
void loop()
{
}
I got at the screen:
11111111
66666666
So now I know where to write the characters in order to be shown, and the voltatge adjust to use for both rows.