Go Down

Topic: My I2C LCD is not working (Read 1 time) previous topic - next topic

furball

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?

bperrybap

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.
https://github.com/duinoWitchery/hd44780

--- bill

furball

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

bperrybap

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

furball

This is my arduino and LCD.

bperrybap

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

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.
Do not touch the String class.

Ever.

bperrybap

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

furball

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

bperrybap

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

acestu

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

bperrybap

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

Unsigned_Arduino

  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.
Do not touch the String class.

Ever.

david_prentice

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

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

bperrybap

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

Go Up