The examples in this guide are no longer supported. Check out the Character LCDs guide for CircuitPython and Python usage: https://learn.adafruit.com/character-lcds/python-circuitpython
Follow the steps below to wire a character LCD to your development board. Be careful to connect each wire to the correct pins as there are quite a few wires necessary to use the character LCD.
Note: The wiring below is for an RGB backlight display. If you're using a monochrome backlight display you can use the wiring as-is and ignore the green and blue backlight wires. The red backlight wire will be used to control the monochrome display's backlight.
If you would like to permanently turn on the LCD backlight, connect the red, green, blue backlight wires to ground instead of to your development board.
Note: The wiring below is for an RGB backlight display. If you're using a monochrome backlight display you can use the wiring as-is and ignore the green and blue backlight wires. The red backlight wire will be used to control the monochrome display's backlight.
If you would like to permanently turn on the LCD backlight, connect the red, green, blue backlight wires to ground instead of to your development board.
The wiring below assumes you're using an Adafruit character LCD which has integrated resistors for the backlight LEDs . If you're using another LCD be careful to check if it's necessary to add a resistor to the backlight power pin. If you're unsure, it can't hurt to replace the wire from LCD pin 15 to power with a 1 kilo-ohm resistor.
- Connect Pi 5V power to the power rail of the breadboard. From the power rail connect one outer lead of the potentiometer, LCD pin 2 (VDD), and LCD pin 15 (LED+).
- Connect Pi ground to the ground rail of the breadboard. From the ground rail connect the other outer lead of the potentiometer, LCD pin 1 (VSS), and LCD pin 5 (R/W).
- Connect the middle lead of the potentiometer to LCD pin 3 (V0/contrast).
- Connect Pi pin 27 (or 21 on older revision Pi's) to LCD pin 4 (RS).
- Connect Pi pin 22 to LCD pin 6 (E/clock enable).
- Connect Pi pin 25 to LCD pin 11 (DB4).
- Connect Pi pin 24 to LCD pin 12 (DB5).
- Connect Pi pin 23 to LCD pin 13 (DB6).
- Connect Pi pin 18 to LCD pin 14 (DB7).
- Connect Pi pin 4 to LCD pin 16 (-R/red).
- Connect Pi pin 17 to LCD pin 17 (-G/green).
- Connect Pi pin 7 / CE1 to LCD pin 18 (-B/blue).
BeagleBone Black
Wire your BeagleBone Black to the LCD as follows. If you aren't familiar with how to identify pins on the board, be sure to read the BeagleBone Black GPIO guide.- Connect BeagleBone Black 5V power pin P9_7 to the power rail of the breadboard. From the power rail connect one outer lead of the potentiometer, LCD pin 2 (VDD), and LCD pin 15 (LED+).
- Connect BeagleBone Black ground pin P8_2 to the ground rail of the breadboard. From the ground rail connect the other outer lead of the potentiometer, LCD pin 1 (VSS), and LCD pin 5 (R/W).
- Connect the middle lead of the potentiometer to LCD pin 3 (V0/contrast).
- Connect BeagleBone Black pin P8_8 to LCD pin 4 (RS).
- Connect BeagleBone Black pin P8_10 to LCD pin 6 (E/clock enable).
- Connect BeagleBone Black pin P8_18 to LCD pin 11 (DB4).
- Connect BeagleBone Black pin P8_16 to LCD pin 12 (DB5).
- Connect BeagleBone Black pin P8_14 to LCD pin 13 (DB6).
- Connect BeagleBone Black pin P8_12 to LCD pin 14 (DB7).
- Connect BeagleBone Black pin P8_7 to LCD pin 16 (-R/red).
- Connect BeagleBone Black pin P8_9 to LCD pin 17 (-G/green).
- Connect BeagleBone Black pin P8_11 to LCD pin 18 (-B/blue).
BeagleBone Black with PWM
The above wiring will use digital IO to control the colors of the backlight display. This means the backlight can only show 7 different colors (all the combinations of the 3 backlight LEDs). However because the BeagleBone Black supports PWM (pulse-width modulation) control of some hardware pins, it's possible to use PWM pins to control the backlight LEDs and display a range of almost all colors.To use PWM control of the backlight LEDs, wire your BeagleBone Black to the LCD as follows. Note that this wiring is exactly the same as the non-PWM wiring, except the 3 backlight LED pins (red, green, blue) are moved to different pins.
- Connect BeagleBone Black 5V power pin P9_7 to the power rail of the breadboard. From the power rail connect one outer lead of the potentiometer, LCD pin 2 (VDD), and LCD pin 15 (LED+).
- Connect BeagleBone Black ground pin P8_2 to the ground rail of the breadboard. From the ground rail connect the other outer lead of the potentiometer, LCD pin 1 (VSS), and LCD pin 5 (R/W).
- Connect the middle lead of the potentiometer to LCD pin 3 (V0/contrast).
- Connect BeagleBone Black pin P8_8 to LCD pin 4 (RS).
- Connect BeagleBone Black pin P8_10 to LCD pin 6 (E/clock enable).
- Connect BeagleBone Black pin P8_18 to LCD pin 11 (DB4).
- Connect BeagleBone Black pin P8_16 to LCD pin 12 (DB5).
- Connect BeagleBone Black pin P8_14 to LCD pin 13 (DB6).
- Connect BeagleBone Black pin P8_12 to LCD pin 14 (DB7).
- Connect BeagleBone Black pin P9_16 to LCD pin 16 (-R/red).
- Connect BeagleBone Black pin P9_14 to LCD pin 17 (-G/green).
- Connect BeagleBone Black pin P8_13 to LCD pin 18 (-B/blue).
Page last edited March 08, 2024
Text editor powered by tinymce.