LCD 16x2 I2C display not working with ESP32 and MicroPython

Customer:

I have your LCD display and I’m trying to use it with EasyC on an Arduino ESP32 with MicroPython. I cannot get any output at all. Is the I2C chip really an MCP23017 or TCA9534? The marking on the chip itself says PN534/C7SE.

Original message (Croatian)

Imam Vaš lcd display i pokušavam ga upogoniti preko easyC dasdruino ESP32 sa micropythonom.

Nikako ne uspjevam dobiti bilo kakav output.

Dali je na i2C zaista MCP23017 ili TCA9534 jer na samom chipu je oznaka PN534/C7SE

Originally submitted via email support on 23 April 2025. Migrated to the forum for community visibility.

Soldered Support:

Our chip is different from the one typically found on those LCD I2C adapters - ours is a PCF8574. We use a modified LiquidCrystal library. Here’s the C++ code which, converted to MicroPython, should work with our LCD I2C adapter: Soldered-LCD-Library/src/libs/LiquidCrystal_I2C.cpp at main · SolderedElectronics/Soldered-LCD-Library · GitHub

Original message (Croatian)

hvala na upitu, naš chip je drugačiji od onog koji se najčešće nalazi na tim LCD I2C adapterima, naš je PCF8574.

Mi koristimo modificirani LiquidCrystal library, evo CPP kod koji, pretvoren u micropython, bi trebao raditi s našim LCD I2C adapterom: Soldered-LCD-Library/src/libs/LiquidCrystal_I2C.cpp at main · SolderedElectronics/Soldered-LCD-Library · GitHub

Nadam se da će biti korisno :slight_smile:

Customer:

I have an update - on Arduino it works fine. If I can’t get it working via I2C and MicroPython, my only option would be to desolder the I2C adapter and connect directly, but then I’d be short of pins on the ESP32.

Original message (Croatian)

Da se javim sa novostima, na
Arduinu radi ok

Ukoliko ne uspijem upogoniti preko I2C i micropythona, jedina opcija mi je odlemiti I2C i spojiti direktno, samo onda će mi nedostajati pinova na ESP32
:frowning:

Attachment omitted in migration: image002.png

Attachment omitted in migration: image001.png

Soldered Support:

Then it’s a MicroPython driver issue - we’ve confirmed it’s the same chip. Essentially the MicroPython driver needs to do the same thing as our .cpp file from the library. Here’s a MicroPython module I generated using our library as a prompt - maybe it will help: https://pastebin.com/raw/XhNKTd8x

We don’t have official MicroPython or CircuitPython libraries for our products yet, but we’re glad there’s interest in them.

Original message (Croatian)

onda je riječ o micropython driveru, ovako smo utvrdili da je isti chip. U suštini micropython driver treba raditi isto što i naš .cpp file iz library-a, evo micropython modul koji sam ja izgenerirao koristeći naš library kao prompt, možda pomogne :slight_smile: https://pastebin.com/raw/XhNKTd8x

Službene micropython ili circuitpython library-e za naše proizvode još nemamo, ali drago mi je da ima interesa za njih :slight_smile:

Customer:

Continuing on the I2C LCD topic. The LCD definitely doesn’t work in MicroPython, though I’m not entirely sure why.

The ESP32 sees it at address 0x20 but communication doesn’t work.

The I2C scan shows: [32, 48] (48 is your relay which works fine via EasyC)

Error: Error communicating with LCD at 0x20. Error: [Errno 19] ENODEV

It’s not the drivers - yesterday I went to get another display and it’s the same chip: PCF8574, just like you said ours uses. It worked right away.

I even wrote my own driver based on your suggestions and everything works fine.

I can provide you with the drivers and test scripts if you want to try them, but unfortunately I think there’s definitely a problem with the I2C chip on our display.

Original message (Croatian)

nastavno na temu i2c lcd-a.

Definitivno LCD ne radi u micropythonu.

Zašto? Nisam ni sam još siguran.

Uglavnom ESP32 njega vidi na 0x20 ali komunikacija ne radi.

[32, 48] (48
je Vaš relay koji radi normalno preko easyC)

Error communicating with LCD at 0x20. Error: [Errno 19] ENODEV

Problem nije u driverima jer sam jućer otišao u Chipoteku po drugi display

Srećom radi se o istom chipu PCF8574 kao što se mi rekli da se radi I o Vašem.

proradio je iz prve.

čak sam napravio I svoj driver od prijedloga koji sam dobio od Vas, isto sve radi normalno.
Mogu Vam dostaviti drivere I testne skripte ako želite isprobavati, ali nažalost mislim da je definitivno
neki problem u I2C chipu.

Attachment omitted in migration: image002.png

Attachment omitted in migration: image001.png

Attachment omitted in migration: image003.png

Soldered Support:

It’s good that the ESP detects it at an address via I2C. It’s not just the chip - our LCD I2C adapter has a special design and requires our driver, which currently exists only for Arduino. I tried to generate a MicroPython file using our .cpp driver but it appears that our LCD I2C adapter implementation requires more development. Everything needed for that implementation can be found in our Arduino library for the adapter, and as we can see from the attachment, it works there.

Original message (Croatian)

dobro je što se ESP pronalazi na adresi, preko I2C-a, nije samo do chipa već naš taj LCD L2C adapter ima poseban dizajn i zahtjeva naš driver, koji trenutno postoji samo za Arduino. Ja sam probao izgenerirati micropython file koristeći naš .cpp driver-a ali izgleda da implementacija našeg LCD I2C adaptera zahtjeva više razvoja. Sve što bi trebalo biti potrebno za tu implementaciju se nalazi unutar našeg Arduino library-a za adapter, kao što vidimo iz priloženog da radi.