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
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
Hardware List:
https://quartzcomponents.com?sca_ref=3671286.DzEptz4I3w
Raspberry pi Pico
https://quartzcomponents.com/products/raspberry-pi-pico?_pos=1&_sid=e3f526c33&_ss=r
HD44780 16x2 LCD
https://quartzcomponents.com/products/16x2-lcd-display-module-blue?_pos=1&_sid=a5f536f88&_ss=r
10k Potentiometer
Bread board
Jumper wires (male to male)
https://quartzcomponents.com/products/65pcs-breadboard-jumper-cable?_pos=1&_sid=07f9ff9a9&_ss=r
330 ohm Resistor
micro-B USB Cable
https://quartzcomponents.com/products/raspberry-pi-cable-for-charging?_pos=2&_sid=55a33decb&_ss=r
Creating the Circuit on the Bread Board
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
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.