Go Down

Topic: LCD2004 Help (Read 4 times) previous topic - next topic

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:
Code: [Select]
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:
Quote
lcdaddr = 0x3F

pins are wired on the PCA857A :
Quote
En = 6, RW = 5, RS = 4, D4 = 0, D5 = 1, D6 = 2, D7 = 3


Even in writing:
Code: [Select]
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/LiquidCrystal_I2Cv1-1.rar

Sincerely
******************************************************************************
bonjour,
merci de votre réponse.
Je viens de faire le test avec Arduino 103, LiquidCrystal_I2C v1.21  et votre code :
Code: [Select]
LiquidCrystal_I2C lcd(lcdAdrr,2,1,0,4,5,6,7); // Addr, EN, RW, RS, D4, D5, D6, D7
cela ne fonctionne pas.

En effet sur l'afficheur que je possède ( Saintsmart LCD20x4 J204A)  l'adresse  a pour valeur :
Quote
lcdaddr = 0x3F

les broches sont cablées sur le PCA8574 :
Quote
En = 6, RW = 5, RS = 4, D4 =0, D5 = 1, D6 = 2, D7 = 3,


Même en écrivant :
Code: [Select]
LiquidCrystal_I2C lcd(0x3F, 6, 5, 4, 0, 1, 2 , 3);
cela ne fonctionne, seulement des flashs !

Une nouvelle bibliothèque de dfrobot qui fonctionne bien avec le J204A :
http://www.dfrobot.com/image/data/DFR0154/LiquidCrystal_I2Cv1-1.rar

Bien cordialement

bperrybap


@tack
******************** by Google ****************
hello,
thank you for your reply.
I just did the test with Arduino 103 LiquidCrystal_I2C v1.21 and your code:
Code: [Select]
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:
Quote
lcdaddr = 0x3F

pins are wired on the PCA857A :
Quote
En = 6, RW = 5, RS = 4, D4 = 0, D5 = 1, D6 = 2, D7 = 3


Even in writing:
Code: [Select]
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/


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

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
Quote
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:
Code: [Select]
LiquidCrystal_I2C  lcd(lcdAdrr, 2,1,0,4,5,6,7, 3, POSITIVE);

--- bill
   

LETARTARE

#7
Jan 15, 2013, 10:21 am Last Edit: Jan 16, 2013, 04:02 pm by LETARTARE Reason: 1
********************* by GOOGLE ****************************
@bperrybap
hello,
thank you for this response which tells me that I need to reread several times what I write.
I'm confused !!
I reversed two libraries (I have download a dozen !)
http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/ with
http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/LiquidCrystal_I2C.zip
that it uses:
Code: [Select]
# define In B00010000 / / Enable bit
# define Rw B00100000 / / Read / Write bit
# define Rs B01000000 / / Register select bit


With your library DFRobot v1.1 your code:
Code: [Select]
LiquidCrystal_I2C LCD (lcdAdrr, 2,1,0,4,5,6,7, 3 POSITIVE)
work properly.

A thousand apologizes for the confusion!
Cordially.
****************************************************************************
bonjour,
merci de cette réponse qui m'indique qu'il faut relire plusieurs fois ce que l'on écrit.
Je suis confus !!
J'ai inversé deux librairies ( j'ai du en charger une bonne dizaine !!) :
http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/ avec
http://hmario.home.xs4all.nl/arduino/LiquidCrystal_I2C/LiquidCrystal_I2C.zip
qui elle utilise :
Code: [Select]
#define En B00010000  // Enable bit
#define Rw B00100000  // Read/Write bit
#define Rs B01000000  // Register select bit


Avec votre librairie DFRobot v1.1 , votre code :
Code: [Select]
LiquidCrystal_I2C  lcd(lcdAdrr, 2,1,0,4,5,6,7, 3, POSITIVE);
fonctionne correctement.

Encore mille excuses pour cette confusion !!!
Bien cordialement.


bperrybap


********************* by GOOGLE ****************************
With the library DFRobot v1.1 your code:
Code: [Select]
LiquidCrystal_I2C LCD (lcdAdrr, 2,1,0,4,5,6,7, 3 POSITIVE)
work properly.


That constructor is for fm's library not the DFRrobot library:
https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads

--- bill

LETARTARE

Of course !!
cordially.

Go Up