16X2 LCD screen

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
guyd
Posts: 81
Joined: Fri Jul 20, 2018 6:08 am

16X2 LCD screen

Post by guyd » Tue Oct 09, 2018 3:49 pm

Hi,
I'm using a 16X2 LCD matrix using I2C- for a project using RPI_ZERO_W.
I'm looking for a equivalent lib in microPython for ESP32/ ESP8266.

Guy

User avatar
pythoncoder
Posts: 3607
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: 16X2 LCD screen

Post by pythoncoder » Wed Oct 10, 2018 6:57 am

Assuming it uses a Hitachi HD44780 chip there are various MicroPython drivers. These from Dave Hylands cover a wide variety of types.

I wrote a uasyncio-based asynchronous driver here, but it only supports parallel connection over a 4-bit interface.
Peter Hinch

guyd
Posts: 81
Joined: Fri Jul 20, 2018 6:08 am

Re: 16X2 LCD screen

Post by guyd » Wed Oct 10, 2018 7:33 am

Hi Peter,
I used Dave's lib, but I don't understand which are the i2c pins to connect to, and what to do when port supplies 3.3v rather than 5v.

adxx
Posts: 5
Joined: Mon Oct 08, 2018 6:45 pm

Re: 16X2 LCD screen

Post by adxx » Wed Oct 10, 2018 9:55 am

AFAIK, default pins for I2C are:
GPIO 4 is SDA
GPIO 5 is SCL

Also, these can be changed to any other pin, because I2C is software driven.

To match 5V on display with 3.3V on GPIO you can use level shifters (different types are available).

Post Reply