Raspberry Pi Pico and 16x2 LCD

by Ramatronics Laboratory in Circuits > Raspberry Pi

4477 Views, 17 Favorites, 0 Comments

Raspberry Pi Pico and 16x2 LCD

IMG_20221002_141729.jpg

In this instructables, I will show you how you can interface(connect) a 16x2 LCD(Liquid Crystal Display) to Raspberry Pi Pico. We will create some Micropython programs for printing a text, scrolling a test and displaying the custom characters on the LCD. Let's get started.

Supplies

mb102-830-point-solderless-pcb-bread-board.jpg

Creating the Circuit on the Bread Board

Raspberry Pi Pico and Lcd_bb.jpg
IMG_20221002_141527.jpg
IMG_20221002_141859.jpg
IMG_20221002_141647.jpg

To create the circuit on a bread board, you can take the help of provided circuit diagram. Insert the Raspberry pi Pico, potentiometer and LCD in the breadboard as shown in the circuit.

make all the connections according to given wiring scheme.

GPIO0 -------------> RS

GPIO1 -------------> E

GPIO2 -------------> D4

GPIO3 -------------> D5

GPIO4 -------------> D6

GPIO5 -------------> D7

VBUS --------------> Red line(rail) of bread board.

GND ----------------> Blue line(rail) of bread board.

Now connect the remaining Pins of the lcd according to given wiring scheme.

Vss -----------------> Blue line(rail) of bread board.

Vdd -----------------> Red line(rail) of bread board.

VO ------------------> To the middle pin (wiper) of the 10K potentiometer.

RW -----------------> To Blue line(rai) of the bread board.

D0 ------------------> not used

D1 ------------------> not used

D2 ------------------> not used

D3 ------------------> not used

A -------------------> Red line(rail) of bread board in series with a 330 ohm current limiting resistor.

K -------------------> Blue line(rail) of the bread board.


Note: Please recheck all the wiring connections if your circuit does not work proper.



Download the Micropython Modules for LCD

For downloading the Micropython module, please visit my GitHub page.

Link: https://github.com/ramjipatel041/Raspberry-Pi-Pico-and-LCD.git

After downloading the gpio_lcd.py and lcd_api.py, now save these two file in the lib folder of your Raspberry Pi Pico without changing the names of the modules.

Uploading the Hello World Example Sketch

IMG_20221002_225541.jpg
IMG_20221002_225731.jpg
IMG_20221002_225221_1.jpg
IMG_20221002_225448.jpg

After saving the gpio_lcd.py and lcd_api.py files in the lib folder of Raspberry pi Pico. now your are ready to run your first hello world program file on the Pico board. If your hello word program work properly then also check the other example such as scroll text.py, Temperature meter.py and custom char.py.