I2C PCF8574AT no way to make it work

Hi all.

Recently I get an Arduino starter kit with a LCD. It works fine and have been doing some tests with it.

Then I get a I2C backpack based on the PCF8574AT and the “nightmare” begun.

I’ve tried a lot of libraries, changing the address, using the libraries of Malpartida (cleaning up previous Liquid Crystal libraries) and also Bill’s ones with no result at all.

As much I can get are the 16 squares in the top line and some blinking but no more.

Using the I2C scanner I found my address was 0x3F and also I used the I2CExpDiag sketch with these results:


Serial Initialized

I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool

hd44780 lib version: 0.9.1

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…
i2c device found at address 0x3F
Total I2C devices found: 1

Scanning i2c bus for all lcd displays
LCD at address: 0x3F | config: P01245673H | R/W control: Yes
Total LCD devices found: 1

LCD Display Memory Test
Display: 0
Walking 1s data test:
Compare error: addr: 0 read 22 != wrote 1
Compare error: addr: 0 read 22 != wrote 2
Compare error: addr: 0 read 22 != wrote 4
Compare error: addr: 0 read 22 != wrote 8
Compare error: addr: 0 read 22 != wrote 10
Compare error: addr: 0 read 22 != wrote 20
Compare error: addr: 0 read 22 != wrote 40
Compare error: addr: 0 read 22 != wrote 80

Compare error: addr: 40 read 22 != wrote 1
Compare error: addr: 40 read 22 != wrote 2
Compare error: addr: 40 read 22 != wrote 4
Compare error: addr: 40 read 22 != wrote 8
Compare error: addr: 40 read 22 != wrote 10
Compare error: addr: 40 read 22 != wrote 20
Compare error: addr: 40 read 22 != wrote 40
Compare error: addr: 40 read 22 != wrote 80

Compare error: addr: 10 read 22 != wrote 1
Compare error: addr: 10 read 22 != wrote 2
Compare error: addr: 10 read 22 != wrote 4
Compare error: addr: 10 read 22 != wrote 8
Compare error: addr: 10 read 22 != wrote 10
Compare error: addr: 10 read 22 != wrote 20
Compare error: addr: 10 read 22 != wrote 40
Compare error: addr: 10 read 22 != wrote 80

Compare error: addr: 50 read 22 != wrote 1
Compare error: addr: 50 read 22 != wrote 2
Compare error: addr: 50 read 22 != wrote 4
Compare error: addr: 50 read 22 != wrote 8
Compare error: addr: 50 read 22 != wrote 10
Compare error: addr: 50 read 22 != wrote 20
Compare error: addr: 50 read 22 != wrote 40
Compare error: addr: 50 read 22 != wrote 80
FAILED
Address line test:
Compare error: addr: 0 read 22 != wrote 0
Compare error: addr: 1 read 22 != wrote 1
Compare error: addr: 2 read 22 != wrote 2
Compare error: addr: 3 read 22 != wrote 3
Compare error: addr: 4 read 22 != wrote 4
Compare error: addr: 5 read 22 != wrote 5
Compare error: addr: 6 read 22 != wrote 6
Compare error: addr: 7 read 22 != wrote 7
Compare error: addr: 8 read 22 != wrote 8
Compare error: addr: 9 read 22 != wrote 9
Compare error: addr: B read 22 != wrote B
Compare error: addr: C read 22 != wrote C
Compare error: addr: E read 22 != wrote E
Compare error: addr: F read 22 != wrote F
Compare error: addr: 10 read 22 != wrote 10
Compare error: addr: 11 read 22 != wrote 11
Compare error: addr: 12 read 22 != wrote 12
Compare error: addr: 13 read 22 != wrote 13
Compare error: addr: 14 read 22 != wrote 14
Compare error: addr: 15 read 22 != wrote 15
Compare error: addr: 16 read 22 != wrote 16
Compare error: addr: 17 read 22 != wrote 17
Compare error: addr: 18 read 22 != wrote 18
Compare error: addr: 19 read 22 != wrote 19
Compare error: addr: 1A read 22 != wrote 1A
Compare error: addr: 1B read 22 != wrote 1B
Compare error: addr: 1C read 22 != wrote 1C
Compare error: addr: 1D read 22 != wrote 1D
Compare error: addr: 1E read 22 != wrote 1E
Compare error: addr: 1F read 22 != wrote 1F
Compare error: addr: 20 read 22 != wrote 20
Compare error: addr: 21 read 22 != wrote 21
Compare error: addr: 23 read 22 != wrote 23
Compare error: addr: 24 read 22 != wrote 24
Compare error: addr: 25 read 22 != wrote 25
Compare error: addr: 26 read 22 != wrote 26
Compare error: addr: 27 read 22 != wrote 27

Compare error: addr: 40 read 22 != wrote 40
Compare error: addr: 41 read 22 != wrote 41
Compare error: addr: 42 read 22 != wrote 42
Compare error: addr: 43 read 22 != wrote 43
Compare error: addr: 44 read 22 != wrote 44
Compare error: addr: 45 read 22 != wrote 45
Compare error: addr: 46 read 22 != wrote 46
Compare error: addr: 47 read 22 != wrote 47
Compare error: addr: 48 read 22 != wrote 48
Compare error: addr: 49 read 22 != wrote 49
Compare error: addr: 4A read 22 != wrote 4A
Compare error: addr: 4B read 22 != wrote 4B
Compare error: addr: 4C read 22 != wrote 4C
Compare error: addr: 4D read 22 != wrote 4D
Compare error: addr: 4E read 22 != wrote 4E
Compare error: addr: 4F read 22 != wrote 4F
Compare error: addr: 50 read 22 != wrote 50
Compare error: addr: 51 read 22 != wrote 51
Compare error: addr: 52 read 22 != wrote 52
Compare error: addr: 53 read 22 != wrote 53
Compare error: addr: 54 read 22 != wrote 54
Compare error: addr: 55 read 22 != wrote 55
Compare error: addr: 56 read 22 != wrote 56
Compare error: addr: 57 read 22 != wrote 57
Compare error: addr: 58 read 22 != wrote 58
Compare error: addr: 59 read 22 != wrote 59
Compare error: addr: 5A read 22 != wrote 5A
Compare error: addr: 5B read 22 != wrote 5B
Compare error: addr: 5C read 22 != wrote 5C
Compare error: addr: 5D read 22 != wrote 5D
Compare error: addr: 5E read 22 != wrote 5E
Compare error: addr: 5F read 22 != wrote 5F
Compare error: addr: 60 read 22 != wrote 60
Compare error: addr: 61 read 22 != wrote 61
Compare error: addr: 62 read 22 != wrote 62
Compare error: addr: 63 read 22 != wrote 63
Compare error: addr: 64 read 22 != wrote 64
Compare error: addr: 65 read 22 != wrote 65
Compare error: addr: 66 read 22 != wrote 66
Compare error: addr: 67 read 22 != wrote 67
FAILED

No working LCD devices

I don’t know is my LCD got broken at any time after soldering the backpack or the backpack itself is faulty.

The question is that I’m absolutely lost with this. I have attached a couple of pictures with the wiring and a closeup of my backpack.

I’ve also tried connecting the LCD to an external 5V source and the 5V pin from Arduino (Nano). Also I swiped the pot to adjust the contrast. It works fine but no characters displayed at all.

Also tried the i2cLCDguesser sketch with these output:

i2cLCDguesser v1.4.1

  • Guess constructor for i2c LCD backpack

NOTE/WARNING: Guessing the i2c constructor is not really a
good thing since it could damage the hardware. Use with caution!
Do not leave things with an incorrect guess for too long.
i.e. advance to the next guess as soon as possible
when the guess in incorrect.
If the guess is correct, the constructor will show up
on the LCD.

<Press or click [Send] to Continue>
Scanning i2c bus for devices…
i2c device found at address 0x3F
Device found: PCF8574
<Press or click [Send] to start guessing>
Trying: lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, NEGATIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x3f, 4, 5, 6, 0, 1, 2, 3, 7, NEGATIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x3f, 6, 5, 4, 0, 1, 2, 3, 7, NEGATIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x3f, 6, 5, 4, 0, 1, 2, 3, 7, POSITIVE)
<Press or click [Send] to Continue>
Trying: lcd(0x3f, 4, 5, 6, 0, 1, 2, 3, 7, POSITIVE)
<Press or click [Send] to Continue>

The only thing it does is to blink 3 times in the first try, then almost a little blink and nothing else on each try. I don’t know what output should I have from here.

I hope you could help me to figure this out :slight_smile:

Thanks in advance!

There is definitely some kind of h/w issue.
Note the output from I2CexpDiag. No matter what the library tried to write to the LCD memory, it read back 0x22
This is an indication of a h/w issue.
Finding exactly what it is can be tricky.

Given you said the LCD worked in the past, that would put more weight on what is new, which is the backpack.
The PCF8574 chip is "talking" as it can be located at address 0x3F and is responding to reads and writes without i2c errors.

I can't tell from the first photo, but I'd take a very close look at the soldering of the header pins to the LCD module.
If there is an issue, all kinds of odd things like that can happen.
I'd look really closely at the RS (module pin 4) and R/W (module pin 5) pins as those control data direction and type of data being written/read.

Can you post another clearer close up photo of the back side of the LCD so we can take a look at the soldering of the pins to the LCD module?

Not much point in trying any other s/w until I2CexpDiag passes the h/w tests.
--- bill

Hi!

Here’s the picture. I’m going to try to desolder to put it on a breadboard to try several LCD’s that I have salvaged from other devices.

Maybe the tracks connectors are broken. The LCD came previously with pins soldered and I desoldered them to put the backpack. I should have put it all together in a breadboard and test before…

Anyway, I’ll keep updating :slight_smile:

Thanks :slight_smile:

Hi again!

Solved :slight_smile:

Looks to be a soldering issue… I put the two parts in the breadboard and working perfectly! :slight_smile: I had to trash the other LCD because the track holes got broken when desoldering but all fine :slight_smile:

I’ll put the circuit together in a PCB blank circuit board and put each one in its own female connectors. This way I can replace the part individually if needed.

Thanks and sorry for this :slight_smile:

ADVICE GUYS!!!: IF YOU CAN AVOID TO SOLDER THE BACKPACK TO THE LCD, AVOID IT! :slight_smile:

mrquiros1980:
ADVICE GUYS!!!: IF YOU CAN AVOID TO SOLDER THE BACKPACK TO THE LCD, AVOID IT! :slight_smile:

Not very good advice.

Soldering is the right, and best way to do it - but it requires that you /can/ solder correctly.

Also, desoldering header pins from trough-plated holes can sometimes pull out the trough-hole-plating if you are not careful, and you'll end up like you did - bad connections.

// Per.

You're right :slight_smile: I need more experience soldering and desoldering :slight_smile: