LCD2004 Help

LETARTARE:
@tack
******************** by Google ****************
hello,
thank you for your reply.
I just did the test with Arduino 103 LiquidCrystal_I2C v1.21 and your code:

LiquidCrystal_I2C LCD (lcdAdrr, 2,1,0,4,5,6,7) // Addr, EN, RW, RS, D4, D5, D6, D7

it does not work.

Indeed the display that I have (Saintsmart LCD20x4 J204A) address is set to:

lcdaddr = 0x3F

pins are wired on the PCA857A :

En = 6, RW = 5, RS = 4, D4 = 0, D5 = 1, D6 = 2, D7 = 3

Even in writing:

LiquidCrystal_I2C LCD (0x3F, 6, 5, 4, 0, 1, 2, 3);

it does not work, just flash!

A new library DFRobot which works well with J204A:
[ http://www.dfrobot.com/image/data/DFR0154/
[/quote]

The code referenced in the DFRobot link shows everything you need to fill in the constructor
the DFRobot code uses:

I2c Bit		LCD

3 Backlight (positive logic)
2 EN
1 R/W
0 RS
4 D4
5 D5
6 D6
7 D7




This pin wiring specified by LETARTARE is incorrect


> En = 6, RW = 5, RS = 4, D4 = 0, D5 = 1, D6 = 2, D7 = 3


according to the working code in the DFRobot link .

The constructor that tack gave was correct and did work, except for the backlight
and since this display uses an inverted display you won't see anything until you
turn on the backlight.
So if the address is 0x3f, the full constructor would be:


LiquidCrystal_I2C  lcd(lcdAdrr, 2,1,0,4,5,6,7, 3, POSITIVE);



--- bill
](http://www.dfrobot.com/image/data/DFR0154/LiquidCrystal_I2Cv1-1.rar)