Help setting up a small LCD screen to my raspberry pi


7 posts
by Morgawr » Tue Oct 09, 2012 3:15 pm
Hi guys, a few weeks ago I bought an LCD screen thinking to connect it to my raspberry pi as a small project for fun.

Here are the schematics of such screen.
Unfortunately, I'm not very good at designing circuits and all that stuff and I'm afraid to overvolt my board (I'm no EE, I'm a CS student) and break the GPIO so I come to you asking if you could help me set up the appropriate resistors to make sure I get the correct amount of voltage/current/whatever for the LCD.

Here's what I came up with: http://www.morgawr.eu/p/1349795415.png
It's fairly straightforward, the left side is the GPIO pins (top and bottom row) and the right side is my LCD screen. I connected the required pins in the correct order (I'm pretty sure, I read a few guides etc etc) but I need to set up resistors to make sure everything works and it doesn't break.

Can you please help me out? I'd be really thankful!

Thank you :D
Posts: 17
Joined: Tue Jun 05, 2012 12:31 am
by MattHawkinsUK » Tue Oct 09, 2012 5:01 pm
First thing is that Pin 1 on the GPIO is 3.3v not 5v.

The LCD backlight can be connected to 5V via a 330 ohm resistor.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)
User avatar
Posts: 491
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
by Morgawr » Tue Oct 09, 2012 5:22 pm
MattHawkinsUK wrote:First thing is that Pin 1 on the GPIO is 3.3v not 5v.

The LCD backlight can be connected to 5V via a 330 ohm resistor.


I'm pretty sure the first pin in the top row of the GPIO is 5v.. it's the bottom one that is 3.3v... or am I wrong?

I'm following this http://elinux.org/Rpi_Low-level_peripherals
Posts: 17
Joined: Tue Jun 05, 2012 12:31 am
by Serac » Tue Oct 09, 2012 11:57 pm
Follow the instructions at http://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module-control-using-python/ and you'll not go far wrong. What ever you do, make absolutely sure that the r/w pin is tied to ground and never try to read from the LCD module. If you do, it is quite possible that the data lines could go to 5V and damage the gpio pins on the Pi.

Assuming it is an HD44780 compatable module, you can also run it in 4bit mode and save your self a bit of wiring.
Posts: 124
Joined: Wed Jul 18, 2012 2:49 pm
by Morgawr » Wed Oct 10, 2012 12:31 am
Serac wrote:Follow the instructions at http://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module-control-using-python/ and you'll not go far wrong. What ever you do, make absolutely sure that the r/w pin is tied to ground and never try to read from the LCD module. If you do, it is quite possible that the data lines could go to 5V and damage the gpio pins on the Pi.

Assuming it is an HD44780 compatable module, you can also run it in 4bit mode and save your self a bit of wiring.


Thank you! This is perfect, I will give it a good read.

And yes, I know I can just use 4bit mode (it is compatible with my LCD) and send in just nibbles two at a time, I don't really care either way, a few cables more aren't going to hurt me and I don't use the GPIO for anything else.
Posts: 17
Joined: Tue Jun 05, 2012 12:31 am
by pygmy_giant » Wed Oct 10, 2012 11:20 am
I'm controlling mine via an I2c driver board so just 2 wires to the pi so other gpio are free.
Posts: 1569
Joined: Sun Mar 04, 2012 12:49 am
by rickseiden » Tue Oct 16, 2012 2:32 am
Morgawr wrote:
Serac wrote:Follow the instructions at http://www.raspberrypi-spy.co.uk/2012/07/16x2-lcd-module-control-using-python/ and you'll not go far wrong. What ever you do, make absolutely sure that the r/w pin is tied to ground and never try to read from the LCD module. If you do, it is quite possible that the data lines could go to 5V and damage the gpio pins on the Pi.

Assuming it is an HD44780 compatable module, you can also run it in 4bit mode and save your self a bit of wiring.


Thank you! This is perfect, I will give it a good read.

And yes, I know I can just use 4bit mode (it is compatible with my LCD) and send in just nibbles two at a time, I don't really care either way, a few cables more aren't going to hurt me and I don't use the GPIO for anything else.


I just used this very post to get my 40 x 2 off ebay running. Quick and easy, and it worked well!
There are 10 types of people in this world. Those that understand binary, and those that don't.
Posts: 398
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA