I2C LCD not displaying characters, instead flashing blocks across screen

All the connections seem to be good. Ive messed with the potentiometer on the backpack and it hasn't made any difference apart from making the flashing boxes not show. Im using the NewLiquidCrystal library and I've tried everything I could find from searching the internet. It was working about a week ago but I then took it apart and put it back together and its not working with me.


The issue might be either the i2c address is incorrect or that the pin mapping in the constructor for the lcd object does not match the actual pin mapping of the backpack that you have.
But if it was working and you took it apart and now it isn't, then there may be a soldering issue.
Can you post some photos of the board?

You could use my hd44780 library instead, it will auto detect the i2c address and pin mappings.
It includes a diagnostic sketch to help diagnose issues.
If you google the forum for duinowitchery you can find many of my posts that talk about it.

The hd44780 library package includes a diagnostic sketch for i2c lcd backpacks to diagnose i2c signal issues and tests the internal RAM of the LCD.
Here is a link to the github repo page that has more information: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library

My recommendation would be install it using the IDE library manager, then run the diag sketch I2CexpDiag, then you can run and look at the other included examples for the hd44780_I2Cexp i/o class to see what header files need to be included and how to declare the lcd object.

--- bill

Hey Bill,

I downloaded your hd44780 library and ran the I2CexpDiag sketch. The backlight blinked 3 times however it remained on the image it has been displaying today (it changed from boxes to just 2 lines). I then uploaded your “Hello World” sketch and still no result.

This information is mostly over my head so if you have any suggestions on how to move forward I would be very grateful.

heres pictures of my current set up and the displayed characters.

I downloaded your hd44780 library and ran the I2CexpDiag sketch.

Please post the complete serial output for the I2CexpDiag sketch.

HI i have some problem my lcd i2c not display word…i use example coding “hello word”
back light on but no any word.

but when other lcd i2c it work…

now i found 2 type of lcd i2c ( pls see photo ). so for not work lcd what should i do? next extra library or coding?

Please post the complete serial output for the I2CexpDiag sketch.

I haven't forgotten about you, just somehow i managed to mess up my board and I'm getting the avrdude:programmer not in sync message. Once I fix this error I'll try to run the sketch again and post the serial output.


I switched the LCD over to my arduino nano and I got this from the serial monitor:

Serial Initialized

I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool

hd44780 lib version: 0.9.0

Reported Arduino Revision: 1.8.3
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
LCD stuck BUSY status

No working LCD devices

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
LCD stuck BUSY status

I’m sure @ bperrrybap can give you better guidance, but the display is failing a test where the library is reading an internal status flag which appears on D7 of the display. It is reading HIGH when it should be LOW. I would carefully check all the solder connections around RS,RW,E and D7. If all the connections are good and not shorted to anything else, there may be an internal problem.

I think(but I may very well be wrong) the hd44780 library requires an active R/W capability and may use the busy status. Certainly the test program does. If you only write to the display some other libraries will work correctly with R/W grounded and no checking of the status flag. However, D7 stuck HIGH as an output internally may effect its ability to receive data as an input.

The New Liquid Crystal library by F Malpartida does not require an active R/W and you may want to give it a try. You will need to get the standard IDE Liquid Crystal out of the libraries folder if you use the F Malpartida library.


Use this code/constructor as determined by the test scan

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F,2,1,0,4,5,6,7,3,POSITIVE)

The hd44780 library doesn’t need or use the r/w line for LCD data/character writes or commands.
The r/w signal is only used/needed for data/character or status reads.
It is noted on the github page in the API summary for the api functions: read() and status() but it may not be as obvious is it could be.

The diagnostic sketch does status and data/character reads as part of its diagnostic tests so yes if the r/w signal is not connected or not working correctly the diagnostic sketch will flag an error.
While it is possible that the particular backpack involved does not connect the r/w pin of the LCD up to the PCF8574 chip, so far I’ve not seen a PCF8574 based backpack that didn’t hook up the LCD r/w pin to the PCF8574.
The backpack in the photos looks identical to one of the ones I have.

When you say you took it apart were you meaning the actual LCD and backpack board? or just the connections to/from the backpack and the Arduino?

I’m a bit concerned that you said you messed up your board? How did that happen? and what was the issue and resolution to get it working again?

The solder connections in the photos appear to look ok.
What is concerning is what is on the display in photo image2.JPG
That looks like some some kind of h/w issue with the LCD module.
Does it change if you press on the LCD glass?

Also, keep in mind that in order to start clean with the LCD you need to power cycle the LCD.
i.e. if there was some kind of issue that caused the LCD chipset to get confused or enter into some strange state, the only way to for sure clear it and start clean is to power cycle the LCD. No amount of resets, or re-uploading the code will reset the LCD as there is no way to really reset a hd44780 LCD from either h/w or s/w. The only way to reset a hd44780 LCD is to power cycle it.

Also, in image1.JPG it looks like VCC signal might be shorting to the SD signal on the backpack.
Make sure those are not shorting as it could damage the Arduino processor.

While it shouldn’t matter given the real Arduino connects analog ground to power ground , you might try moving the black wire ground signal from the analog ground pin to one of the actual power ground pins over by the 5v pin. (just in case your board doesn’t connect the analog ground signal to power ground)

— bill