My I2C LCD is not working

I'm trying to test my lcd but when I try to find its address, and it seems like arduino can't find it.
I'm using Uno, and I only see white squares when I try to print something.
Lcd is connected to A5 and A4, and there's noting wrong with the wires.
Anyone knows what is causing this?

If the device can't be located then there is an i2c issue. It could be that the wires are not making proper contact, wired incorrectly or the pullup resistors are not present.

I would recommend that you use my hd44780 library package.
The hd44780_I2Cexp i/o class that comes in the package includes a diagnostic sketch, I2CexpDiag, that can help identify issues.
It can and should be installed using the IDE library manager.

--- bill

Still no sign of it..


Serial Initialized

I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool

hd44780 lib version: 0.9.4

Reported Arduino Revision: 1.8.5
CPU ARCH: AVR - F_CPU: 16000000

A4: digital pin: 18
A5: digital pin: 19
SDA: digital pin: 18
SCL: digital pin: 19

Checking for required external I2C pull-up on SDA - YES
Checking for required external I2C pull-up on SCL - YES

Scanning i2c bus for devices..
Total I2C devices found: 0
No I2C devices found

can you post some photos of everything so we can take a look at the devices, the wires and the soldering?

This is my arduino and LCD.

I don't see anything obvious in the photo.
To try to isolate the issue a bit more try this:

  • remove just the wire going to A4
    re-run the test, you should get a message saying that the pullup on SDA is missing.

  • next remove the wire going to A5 and re-run the test
    You should then get a message that the pullup on SCL is missing.

If you get those messages then the issue is not the wires and is on the backpack.
It is either a bad PCF8574 or the SDA and SCL pins are shorted or not soldered properly.

If you do get those messages, then I'd like to see a closeup photo of the backpack to be able to look for any other issues like soldering issues on the PCF8574, specifically pins 14 and 15.

--- bill

Try using a different I2C LCD and rerunning the test. If the problem still exist, I would think there is something wrong in the code.

Unsigned_Arduino:
Try using a different I2C LCD and rerunning the test. If the problem still exist, I would think there is something wrong in the code.

This is beyond a simple coding issue.
The Arduino code for locating an I2C slave device is quite simple and well understood, there is not going to be an issue in that type of code as it has been wrung out by many people on many devices for several years.

IMO, this is a h/w issue.
The question becomes what is the issue?

The issue can potentially be on either side or the wiring between the two.
An issue on the backpack, or wiring, as I mentioned earlier or it could be an issue in the AVR itself.

The best approach is to test things logically and methodically to try to narrow down where the issue is.

--- bill

I can't get any other results..
It still says it cannot find anything..

You are not saying what you have tried and the results of those tests.

What were the results of the tests I recommended in post #5 ?

--- bill

Hi,

Try connecting some 10k pull up resisters to the clock and data lines, also check out this great tutorial:

https://arduino-info.wikispaces.com/LCD-Blue-I2C

Stuart

acestu:
Try connecting some 10k pull up resisters to the clock and data lines, also check out this great tutorial:

Pullups are not the issue, see the output in post #2

Is your Arduino a clone or it is a modified Uno? If it is a modified version, it might not have scl and sca on analog pins 4 & 5. Use the scl and sca pins labeled and run the test again.

All Unos, Duemilanoves, Diecimilias, ... have I2C on A4, A5.

They do not all have dedicated SDA, SCL on the second Digital header.

The diag output shows that sda and scl are on pins a4 and a5

Try a different I2C device that you know is working. Then rerun the test. It should indicate something on the I2C bus. If so, your adaptor might be broken.

I am also having a problem with my IC2 LCD 16 x 2 screen and have downloaded the HD44780 master zip file.

Firts of all how do I install the files using the IDE Library Manager. With just loading the LCDiSpeed file, when I compile it there is and error message

Using board 'uno' from platform in folder: /home/rob/Downloads/arduino-1.8.5/hardware/arduino/avr
Using core 'arduino' from platform in folder: /home/rob/Downloads/arduino-1.8.5/hardware/arduino/avr
Detecting libraries used...
"/home/rob/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR
"-I/home/rob/Downloads/arduino-1.8.5/hardware/arduino/avr/cores/arduino"
"-I/home/rob/Downloads/arduino-1.8.5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_638039/sketch/LCDiSpeed.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/home/rob/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR
"-I/home/rob/Downloads/arduino-1.8.5/hardware/arduino/avr/cores/arduino"
"-I/home/rob/Downloads/arduino-1.8.5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_638039/sketch/LCDiSpeed.ino.cpp" -o "/tmp/arduino_build_638039/preproc/ctags_target_for_gcc_minus_e.cpp"
LCDiSpeed:90: error: #error "Special purpose sketch: Use i/o class example wrapper sketch instead."
#error "Special purpose sketch: Use i/o class example wrapper sketch instead."
^
exit status 1
#error "Special purpose sketch: Use i/o class example wrapper sketch instead."

avvy66:
I am also having a problem with my IC2 LCD 16 x 2 screen and have downloaded the HD44780 master zip file.

Firts of all how do I install the files using the IDE Library Manager. With just loading the LCDiSpeed file, when I compile it there is and error message

Off topic, but here is a quick response.
Read the instructions and included documentation.
You seem to have not read the information on the github page that includes detailed installation instructions on how to install the library including how to use the IDE library manager to do the installation should you not know how.
The github page also includes information as to where the examples are and where to look for further Information and Documentation.


For furball's issue, still waiting for the results of the results of the tests suggested in post #5.

--- bill

Thanks , no you you were right, not reading the information etc, but I have now.

I have now installed the extensible HD44780 library file from the Library Manager, and have included it into a new sketch.
The Serial Monitor was running prior to uploading, and now does not show anything. I then included the hd44780 library into an existing sketch, but again does not show anything other than reversed question marks.

The SDA and SCL pins are on A4 and A5 respectifly, and the variable resistor on the back of the I2C board is turned fully clockwise.

Have I missed something?

and have included it into a new sketch.

Have I missed something?

Hmm. Let me think . . .