SerLCD display with Raspberry Pico will not display text

I am trying to interface a Pio with the LCD display using the code from the Raspberry Pico manual and get an OSError 5 (no device). I have added a delay from one suggestion. The program prints out the device id (114) but will not display the text.

The code follows. Any suggestions?

import machine

import utime

sda = machine.Pin(0)

scl = machine.Pin(1)

i2c = machine.I2C(0, sda = sda, scl = scl, freq = 400000)

print(i2c.scan())

utime.sleep_ms(100)

i2c.writeto(114, ‘\x7C’)

i2c.writeto(114, ‘\x2D’)

i2c.writeto(114, “hello world”)

Thanks for reaching out to us on this.

It might help if you can show pictures of your wiring & setup.

OS Error 5 is an I/O error, most likely pointing to a wiring issue - please inspect your solder joints etc. to verify they may not be the source of the issue. Next it might be a good idea to re-flash the pico with the latest image from pi foundation.

Finally, ensure the LCD screen isn’t set in SPI mode, per its datasheet.

Hope this helps, and happy sparking!

Might try slowing down the I2C bus to 100 kbit/s, sometimes the 400 kbit/s speeds cause issues on some parts.

Thanks for the suggestions. I turned the power off and the next day turned the pico on and the display works. Will of the gods?

Sometimes it’s like that for me too!

I’m a novice and am using an R Pi Pico and the book ‘Get started with MicroPython on Raspberry Pi Pico’. I’ve just purchased a SerLCD display 16x2 , RGB text on black, 3V3 logic (Qwiic), but haven’t received it yet. I think I need a cable to join the LCD to my breadboard with a Qwiic connector on one end and 4 male (DuPont?) headers on the other. But are there male and female Qwiic connectors? And which type of Qwiic would I need on the end of this cable? Is this the correct one? https://thepihut.com/products/qwiic-cab … mper-4-pin

That cable would be the right one and it does make it so you can connect to your display without soldering, but it’s also possible to solder wires to the power and I2C pads (DA & CL) on the board if you want to skip the extra cable. :slight_smile:

Thank you @TS-Chris . Both of these suggestions solve my problem, are very helpful and clearly explained. :slight_smile:

I ended up purchasing this cable: https://shop.pimoroni.com/products/jst- … 0609846355 to use with i2c with the SerLCD and it works, hooray! In the Pico book “Get started with Micropython on …” it’s easy to see how to wire it up except the book shows the SCL wire as purple and that is the yellow wire on the Qwiic cable.

I am experiencing the same issue when trying to interface the SerLCD display 16x2 , RGB text on black to the Pi Pico. i2c scan reports the display at address [114]. I ohmed out the connections - all appear to be correct. I ran the same code as above (except I am connected to Pins 16 & 17, sda & scl respectively.

import machine

import utime

sda = machine.Pin(16)

scl = machine.Pin(17)

i2c = machine.I2C(0, sda = sda, scl = scl, freq = 400000)

print(i2c.scan())

utime.sleep_ms(100)

i2c.writeto(114, ‘\x7C’)

i2c.writeto(114, ‘\x2D’)

i2c.writeto(114, “hello world”)

I am receiving the same error (OS Error 5)… However, when I “writeto” from the shell, the display responds. And just to verify, I tried running the program immediately after issuing the shell commands, and the problem reappeared. See below:

MicroPython v1.19.1 on 2022-06-18; Raspberry Pi Pico with RP2040

Type “help()” for more information.

%Run -c $EDITOR_CONTENT

[114]

Traceback (most recent call last):

File “”, line 10, in

OSError: [Errno 5] EIO

i2c.writeto(114, ‘\x7C’)

1

i2c.writeto(114, ‘\x2D’)

1

i2c.writeto(114, “hello world”)

11

%Run -c $EDITOR_CONTENT

[114]

Traceback (most recent call last):

File “”, line 10, in

OSError: [Errno 5] EIO

Any help in getting the program to run correctly is appreciated!

I’m having the same issue. Tried it with 2 different qwiic connector cabless and on different pins on two of my Picos. Same result. I see text when I start it up, but then just white blocks. Running the attached code I get the error as noted. Saw the reference above to SPI mode but no idea where to find how to reset that. Looked at all the available documents you have online for the lcd o9067 but don’t find anything like that. Do I just have a bad unit?

I am using the LCD-16396 display. Following the example code in the “Get Started with … Pico”, I was not able to get anything written to the display. After hours of reading forums and trying different suggestions, I was able to get characters written to the display. After I reduced freq to 50000, I was able to write 32 characters (16 x 2) to the display. I was also able to get a slight green background to turn on, but failed turning the color off. The codes for the blue background did not work.

Does anyone know where I can find the correct codes for this display?

Thanks,

Richard