Lcd 2004A Show nothing with I2C

Hello
I have a problem with the screen. Before adding I2C, it was working well. After adding I2C, it became as you see, even though I put the necessary libraries and the linking is correct. I even tried all the necessary addresses. Note that the screen is 20×04. Where is the problem?



.......
This is the program I used:

#include <wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 20, 4); // I2C address 0x27, 20 column and 4 rows

void setup() {
lcd.init(); // initialize the lcd
lcd.backlight();

lcd.setCursor(0, 0); // move cursor the first row
lcd.print("LCD 20x4"); // print message at the first row
lcd.setCursor(0, 1); // move cursor to the second row
lcd.print("I2C Address: 0x27"); // print message at the second row
lcd.setCursor(0, 2); // move cursor to the third row
lcd.print("hello,wolrd");
}

void loop() {
}

You could try address0x3f.

Better yet, install and use the hd44780 library.

The library is available to install through the IDE library manager.

The library will automatically determine the I2C address and backpack to LCD pin mapping.

If you have trouble, there is a diagnostic.

There is lots of documentation.

Read the how to get the best from the forum to see how to properly post code.

Yes, I used that title I used all possible addresses but it did not work I searched and found that it might be a compatibility issue i2c
And 2004A I found that there are two types of screen: Type A and Type B and each type corresponds I2c Dedicated to him, noting that my screen is type A. I could not find a type I2c Dedicated to her!!

I have used many such LCD I2C enabled displays and have not found, even, one functional display that did not work with the hd44780 library.

Please run the diagnostic sketch and post the tesults. @bperrybap (library author) may see the result and have an answer quickly.

Plain and simple the library is not properly communicating with the LCD.
Because of this, the LCD is remaining in the default power on state.
This could be caused by multiple issues, the most common being
using incorrect address, wiring/soldering issues.

We don't know what arduino board you are using or how you have wired it up or if you might have a 3v vs 5v logic issue.
We don't know what library you are using.
So lots of unknowns.

There is the possibility that the backpack design that you have is not compatible with the "LiquidCrystal_I2C" library you are using.
note: there are many different "LiquidCrystal_I2C" libraries out there, we don't know which one you used.
Nearly all of them are hardcoded for one of the 5 different backpack designs out there.
If there is a mismatch, between the library and the backpack design then the library cannot properly communicate with the LCD even if the i2c address specified is correct.

The other possibility is that there is an issue with the backpack.
While it does happen from time to time, it is quite rare.

The simplest thing to do is install the hd44780 library and run the included I2CexpDiag sketch in the hd44780_I2Cexp i/o class and see if can detect any issues.

The hd44780 library is the only library that will automatically locate the i2c address and automatically detect the pin wiring used between the PCF8574 chip and the LCD.

Here is a link to the hd44780 library wiki for the hd44780 library hd44780_I2Cexp i/o class:
https://github.com/duinoWitchery/hd44780/wiki/ioClass:-hd44780_I2Cexp

--- bill

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.