LCD with I2C expander can not display text, only control backlight.

I am working on LCD 1602A, with I2C interface.
but it doesn't work, the I2C address is 0x3F, Arduino can control
the LCD backlight, you can see from the video, but can not display any text

using I2C scanner, it can scan the address.
but using diagnostic, it show error as below. I check LCD and I2C expander, solder seems good, not issue found.


Serial Initialized

I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool

hd44780 lib version: 1.0.1

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

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

Checking for required external I2C pull-up on SDA - YES
Checking for required external I2C pull-up on SCL - YES
Checking for I2C pins shorted together - Not Shorted

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 11 != wrote 1
Compare error: addr: 0 read 13 != wrote 2
Compare error: addr: 0 read 15 != wrote 4
Compare error: addr: 0 read 19 != wrote 8
Compare error: addr: 0 read 11 != wrote 10
Compare error: addr: 0 read 31 != wrote 20
Compare error: addr: 0 read 51 != wrote 40
Compare error: addr: 0 read 91 != wrote 80

Compare error: addr: 40 read 11 != wrote 1
Compare error: addr: 40 read 13 != wrote 2
Compare error: addr: 40 read 15 != wrote 4
Compare error: addr: 40 read 19 != wrote 8
Compare error: addr: 40 read 11 != wrote 10
Compare error: addr: 40 read 31 != wrote 20
Compare error: addr: 40 read 51 != wrote 40
Compare error: addr: 40 read 91 != wrote 80

Compare error: addr: 10 read 11 != wrote 1
Compare error: addr: 10 read 13 != wrote 2
Compare error: addr: 10 read 15 != wrote 4
Compare error: addr: 10 read 19 != wrote 8
Compare error: addr: 10 read 11 != wrote 10
Compare error: addr: 10 read 31 != wrote 20
Compare error: addr: 10 read 51 != wrote 40
Compare error: addr: 10 read 91 != wrote 80

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

Compare error: addr: 40 read 5D != wrote 40
Compare error: addr: 41 read 5D != wrote 41
Compare error: addr: 42 read 5D != wrote 42
Compare error: addr: 43 read 5D != wrote 43
Compare error: addr: 44 read 75 != wrote 44
Compare error: addr: 45 read 75 != wrote 45
Compare error: addr: 46 read 77 != wrote 46
Compare error: addr: 47 read 77 != wrote 47
Compare error: addr: 48 read 59 != wrote 48
Compare error: addr: 49 read 59 != wrote 49
Compare error: addr: 4A read FB != wrote 4A
Compare error: addr: 4B read FB != wrote 4B
Compare error: addr: 4C read 5D != wrote 4C
Compare error: addr: 4D read 5D != wrote 4D
Compare error: addr: 4E read F3 != wrote 4E
Compare error: addr: 4F read F3 != wrote 4F
Compare error: addr: 50 read 5D != wrote 50
Compare error: addr: 51 read 5D != wrote 51
Compare error: addr: 52 read 5D != wrote 52
Compare error: addr: 53 read 5D != wrote 53
Compare error: addr: 54 read 75 != wrote 54
Compare error: addr: 55 read 75 != wrote 55
Compare error: addr: 56 read 77 != wrote 56
Compare error: addr: 57 read 77 != wrote 57
Compare error: addr: 58 read 59 != wrote 58
Compare error: addr: 5A read FB != wrote 5A
Compare error: addr: 5B read FB != wrote 5B
Compare error: addr: 5C read 5D != wrote 5C
Compare error: addr: 5E read F3 != wrote 5E
Compare error: addr: 5F read F3 != wrote 5F
Compare error: addr: 60 read 73 != wrote 60
Compare error: addr: 61 read 73 != wrote 61
Compare error: addr: 62 read 73 != wrote 62
Compare error: addr: 63 read 73 != wrote 63
Compare error: addr: 64 read 75 != wrote 64
Compare error: addr: 65 read 75 != wrote 65
Compare error: addr: 66 read 77 != wrote 66
Compare error: addr: 67 read 77 != wrote 67
FAILED
Memory test failures are usually due to poor solder connections
Most common cause is poor solder joints on pins soldered to the LCD


No working LCD devices

No video found.

So you do have the I2C backpack actually soldered to the display, don't you?

yes, I2C expander has already soldered to LCD when I bought it, and since Arduino board can control the LCD backlight with I2C expander
the video size too large, can not upload, sorry

Well, Bill's code indicates a faulty connection to D4 on pin 11. You would need to check both the backpack and LCD module for the connections - and tracks - to that pin.

chris_liush:
yes, I2C expander has already soldered to LCD when I bought it,

Show a photo of the other side so we can see the soldering of the backpack to the LCD.

If there are soldering issues, the errors shown may not be reliable as the auto detection can be fooled into detecting an improper pin mapping. If the pin mapping used is incorrect, then the library can't talk to the LCD so data reads/writes will fail with unpredictable results.

But I agree with Paul, it looks like there is an issue with the connection to DB4 as it controls bit 0 and bit 4 of the data byte which are both stuck high, which is what you would see if PCF8574 pin P4 (pin 9) were not connected to LCD pin DB4 (pin 11).

So look very closely at the solder on PCF8574 pin 9, and LCD pin 11.

--- bill

Paul__B:
Well, Bill's code indicates a faulty connection to D4 on pin 11. You would need to check both the backpack and LCD module for the connections - and tracks - to that pin.

Hi, paul, bperrybap
You are right. I double check the pin P4 and D4, the connection is broken. Thank you so much.
Another question, what is meaning for the diagnostic result. Could you explain it. Which error show connect between these 2 pins is wrong. I want to learn more :slight_smile:

chris_liush:
Hi, paul, bperrybap
You are right. I double check the pin P4 and D4, the connection is broken. Thank you so much.

Is it now working?
What was the problem? Was it a soldering issue? and where?

Another question, what is meaning for the diagnostic result. Could you explain it. Which error show connect between these 2 pins is wrong. I want to learn more :slight_smile:

All the errors showed the issue.
Notice that bit 0 and bit 4 were always read as 1 no matter what was written.

The LCD is using 4 bit mode which means it uses 2 four bit nibbles to send the 8 bit byte.
The first nibble is bits 0 to 3 and the second nibble is bits 4 to 7 of the 8 bit byte.
When using nibble mode on the LCD, pins DB4 to DB7 are used for the nibble transfer.
The errors are on bit 0 and bit 4 of the data byte.
Those bits are both sent/read by DB4, therefore there seems to be an issue with DB4 which is pin 11 on the LCD.

To see where that connects to the PCF8574 you could visually look at the board or use an ohm meter.
In this case you can look at the configuration detected by the library: P01245673H
Note that when there are connection issues auto detection isn't always reliable, but in this case it seems to still have detected the pin mappings.
That reports the chip (PCF8574) is using these pins:

rs P0
rw P1
en P2
db4 P4
db5 P5
db6 P6
db7 P7
backlight control P3
Active high backlight control.

db4 on the lcd is connected to PCF8574 pin P4 which is physical pin 9 on the PCF8574 chip.

Based on this information, it looked like there was an issue with the connection between PCF8574 P4 (physical pin 9) and the db4 pin on the LCD which is pin 11 on the LCD module.

--- bill

bperrybap:
Is it now working?
What was the problem? Was it a soldering issue? and where?

All the errors showed the issue.
Notice that bit 0 and bit 4 were always read as 1 no matter what was written.

The LCD is using 4 bit mode which means it uses 2 four bit nibbles to send the 8 bit byte.
The first nibble is bits 0 to 3 and the second nibble is bits 4 to 7 of the 8 bit byte.
When using nibble mode on the LCD, pins DB4 to DB7 are used for the nibble transfer.
The errors are on bit 0 and bit 4 of the data byte.
Those bits are both sent/read by DB4, therefore there seems to be an issue with DB4 which is pin 11 on the LCD.

To see where that connects to the PCF8574 you could visually look at the board or use an ohm meter.
In this case you can look at the configuration detected by the library: P01245673H
Note that when there are connection issues auto detection isn't always reliable, but in this case it seems to still have detected the pin mappings.
That reports the chip (PCF8574) is using these pins:

rs P0

rw P1
en P2
db4 P4
db5 P5
db6 P6
db7 P7
backlight control P3
Active high backlight control.




db4 on the lcd is connected to PCF8574 pin P4 which is physical pin 9 on the PCF8574 chip.

Based on this information, it looked like there was an issue with the connection between PCF8574 P4 (physical pin 9) and the db4 pin on the LCD which is pin 11 on the LCD module.

--- bill

Bill
yes, it is working after flying wire between P4 and D4.
thanks a lot for your explaination in detail

Glad its working.
Was the trace on the PCB really bad? I've never seen that type of failure on these backpacks.
I have occasionally seen bad solder connections on the PCF8574 Pn pins like P4 where the pin is sitting on top of the solder and not making proper contact. Those are usually fixed by heating up the solder on those pins.

--- bill

bperrybap:
Glad its working.
Was the trace on the PCB really bad? I've never seen that type of failure on these backpacks.
I have occasionally seen bad solder connections on the PCF8574 Pn pins like P4 where the pin is sitting on top of the solder and not making proper contact. Those are usually fixed by heating up the solder on those pins.

--- bill

trace is ok, only the solder connection of the pin

chris_liush:
trace is ok, only the solder connection of the pin

What pin?
So a wire was not needed?

PCF8574 PIN9(D4) not solder very well, but I can not fix it. Currently I just use wire directly connect to LCD D4

chris_liush:
PCF8574 PIN9(D4) not solder very well, but I can not fix it. Currently I just use wire directly connect to LCD D4

I have seen that before.
Glad its all working now.
--- bill