The controller works from 3,3VDC to 5VDC. The liquid crystal requires 5VDC to operate. The ones which are advertised as 3.3VDC displays also boost the LCD voltage to 5VDC.
The Hitachi HD44780 LCD controller is compatible with 3.3VDC and 5VDC. What I am using is a PCF8574 8-bit port expander backpack connected to the LCD, to reduce the pin-count required to run the LCD.
Exactly what I'm thinking. But this doesn't work. And the same arrangement works with the Nano.
Another interesting thing:
When I run the test program, there is a place where the backlight is toggled on and off. That works! Even while the LCD display doesn't, even with a 5VDC supply. That leads me to suspect that there is something the matter with the core itself, not the connections or the software.
Unless you can think of something else.
With the Arduino mbed core for the Pico, you have to open up arduino.h and edit the pin assignments for the I2C interface.
Yes, checked contrast pot.
Yes, pins checked. The Pico has multiple pins that can be used for UART, SPI and I2C. That is why Earle has added the Wire.setSDA(pin) method for I2C.
I fitted the port expander myself and have done several dozens by now. In any case, it works alright with a Nano.
Yes the PCF8574 works alright with 3.3VDC according to the datasheet and as evidenced by the backlight toggling.
Okey.
And You use "allowed" pins for SDA/SCL? Setting, yes, but I guess that not every I/O pin works as I2C.
Check the connections between expander and LCD again. Was any unintended thing happening during the road from nano to RB?
You are confusing the power supply to the LCD which must be 5 V, with the I²C interface on the backpack which can be 3.3 V if you remove the 4k7 pullups on the backpack and connect them separately to 3.3 V.
The problem here is having a library compatible with the Pi Pico.
The problem appears to be with the I2C library. I have abandoned the I2C backpack and am now using 4-bit parallel mode to drive the 20x4 LCD display. Everything is OK now...
Just curious which LCD library are you using?
I haven't tested that platform with the hd44780 library and I don't yet have the h/w to test it.
If you aren't using the hd44780 library, could I get you to try it with that library to make sure it works?
After you install the hd44780 library, run the diagnostic sketch, I2CexpDiag.
For this to work you will need to use the default pins for the SDA and SCL.
I was using the LiquidCrystal_PCF8574 library. I could scan the bus and find the PCF8574. But it just refused to work with the Pico.
I have now discarded the PCF8574 I2C backpack and am using the plain vanilla LiquidCrystal library in 4-bit parallel mode. This works. Though I've lost 5 extra pins...
I have just downloaded Earle's updated Arduino core. I wonder if things are better now. I'll try that tomorrow I think, with an MPU9250 I2C port and report back to you...
I have a PCB on which there is an input of 12VDC, which is reduced to 9VDC by a 3A buck converter, for supplying the Pico VSYS pin and a 7805 strung, up on the 9VDC to supply 5VDC to the 20x4 LCD display.
What was happening is, that when the backlight was switched on, the 7805 supply would drop to 3.4VDC and the LCD would stop displaying. I caught this only when I experimented with switching off the backlight. Till then, I had the backlight on from the beginning of the program...
So, the problem was with the 5VDC supply to the LCD...