Go Down

Topic: Temperamental LCD1602A using GY-IICLCD (Read 478 times) previous topic - next topic


The chip is the PCF8574 and it just arrived in the post from Banggood along with the LCDs.

This is the first time I got this model and after significant playing around and running into errors that never seemed to repeat themselves and never seemed to make sense to me, I finally the "Hello World" to come up. But within a minute or two as I continued to play around it was lost again. I got it back several more times but nothing permanent. I am wondering what would make it so temperamental.

I attach here some of the various screen errors that came up. There were no code errors for most of the time and I am pretty sure that I have the address (0x20,) sorted.

I have two additional 'backpacks' that use PCF8574A that uses (0x38) that  I haven't managed to get anything out of so far. I want to take it step by step as I am spending way too much time on this already.


I'd recommend that you use my hd44780 library. It can offer a "plug and play" solution for PCF8574 backpack based LCD devices.
It can auto detect everything including the i2c address, pin mappings, and backlight control.
Because it auto detects everything runtime, you can swap out the backpack/LCD with another device and the new device will "just work" as soon as the Arduino is reset even if the i2c address and pin mappings are different. You won't have to modify any of your code when changing devices.
It includes features not available in other libraries and is also faster than other libraries as the Arduino can run in parallel to the LCD commands.
It also includes a diagnostic sketch, I2CexpDiag, to test the i2c signals, backpack and LCD.
It is available in the IDE library manager so you can quickly and easily install it.
You can read more about it on the github page: https://github.com/duinoWitchery/hd44780
And on the wiki: https://github.com/duinoWitchery/hd44780/wiki

Install it from the IDE library manager and not using a zip file.

The i/o class for the backpack you have is hd44780_I2Cexp

I'd recommend first running the I2CexpDiag sketch to verify that the library is able to talk to your device.
Then you can look at the other hd44780_I2Cexp sketches like the HelloWorld to see the header files that need to be included and how to declare the lcd object.

--- bill


Thank you Bill.
I will let you know how it goes.



Go Up