februariusx
Posts: 7
Joined: Tue Sep 22, 2015 8:37 am

4x20 lcd connection

Tue Sep 22, 2015 8:51 am

hi ,

im new in rasp world,

i have some question in connecting 4x20 LCD on raspberry pi 2 model b GPIO,

i cannot post a display on LCD , i dont know if my connection are not correct

im just replacing my old system MCU to Raspberry

BMS Doug
Posts: 4423
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: 4x20 lcd connection

Tue Sep 22, 2015 11:38 am

please describe how you are attempting to connect the 4x20 display to the Pi.

Pictures would be useful (you will need to post them on an image hosting site and supply a link to the picture in the thread).
Doug.
Building Management Systems Engineer.

ame
Posts: 7119
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: 4x20 lcd connection

Tue Sep 22, 2015 12:08 pm

Here's a working example:
http://www.raspberrypi-spy.co.uk/2012/0 ... ng-python/

Does it help?
Hmm. What can I put here?

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: 4x20 lcd connection

Tue Sep 22, 2015 12:45 pm

februariusx wrote:hi ,

im new in rasp world,

i have some question in connecting 4x20 LCD on raspberry pi 2 model b GPIO,

i cannot post a display on LCD , i dont know if my connection are not correct

im just replacing my old system MCU to Raspberry
if it's a hd44780 based display, you can find tons of schematics and code on google..
(one example is the link ame posted)


raycarter
Posts: 10
Joined: Sat Sep 19, 2015 12:36 am

Re: 4x20 lcd connection

Wed Sep 23, 2015 10:38 pm

Try this link:
https://learn.adafruit.com/character-lc ... k?view=all

It shows a 16x2, but the wiring is the same. Adafruit also has an LCD 'backpack' that makes it useable via i2c or spi - only 4 wires for i2c or 5 for spi.

User avatar
mikronauts
Posts: 2823
Joined: Sat Jan 05, 2013 7:28 pm

Re: 4x20 lcd connection

Wed Sep 23, 2015 10:44 pm

You can also try following my article:

http://www.mikronauts.com/raspberry-pi/ ... terfacing/
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

februariusx
Posts: 7
Joined: Tue Sep 22, 2015 8:37 am

Re: 4x20 lcd connection

Thu Sep 24, 2015 3:31 am

thanks for replies

i did your samples,

but my lcd dosent posting display

is there compatibility should be considerate between dot matrix lcd and rpi?

anyway i try some scripts based on the links

it given me segmentation fault

current i run my RPI with debian/ubuntu vice-versa , it is because i have already running apps in there from i386 and already migrated to arm, only i need is the display out to lcd and rs232 later

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 14919
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: 4x20 lcd connection

Thu Sep 24, 2015 10:57 am

One compatibility problem, could be that the PI outputs 3.3V logic high levels, and for many LCD controllers 3.3V is not enough, they need at least 3.5V (70% of VCC).
To prevent the need to use level converters for all the control lines, you can lower VCC from 5.0V to 4.5V, by using a diode to drop 0.5V. Simply put a small diode (1N4148) in between the 5V and the VCC of the display.

februariusx
Posts: 7
Joined: Tue Sep 22, 2015 8:37 am

Re: 4x20 lcd connection

Wed Sep 30, 2015 2:02 am

hi everyone

i bought 2x16 liner 1602A lcd ,

and their it is

https://lh3.googleusercontent.com/-tt2D ... 7510_n.jpg

and still the sample scripts dosent working

http://www.raspberrypi-spy.co.uk/2012/0 ... ng-python/

the previous issue with segmentation fault with raspberry debian jessie

now i reverted to raspberry debian wheezy , no more segmentation fault,

and my problem now , it still dosent displaying :(

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: 4x20 lcd connection

Wed Sep 30, 2015 7:30 am

lol, i love how you described your problem..
"not displaying"

btw, at least you should consider that your display has 6+5 connections, while usually it must have 6+6 connections..

for the rest, really "not displaying" is not a description and noone will help you in this way

User avatar
rpdom
Posts: 21828
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: 4x20 lcd connection

Wed Sep 30, 2015 10:01 am

You don't seem to have anything connected to pin 3 - the LCD contrast pin. Without that you might not be able to see the displayed text. Try looking at the display from a shallow angle - almost edge-on from the bottom edge - you might see some text or just square blocs on the display.

User avatar
DougieLawson
Posts: 42481
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: 4x20 lcd connection

Wed Sep 30, 2015 5:52 pm

Ideally, you need to connect the contrast pin to the wiper of a 10K trimpot (wired between 5V0 and GND) and adjust that until the display appears. If you don't have a trimpot try a series of 1K resistors.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

februariusx
Posts: 7
Joined: Tue Sep 22, 2015 8:37 am

Re: 4x20 lcd connection

Thu Oct 01, 2015 8:48 am

hi guy,

thanks for help

i already did work

i added 10k potentiometer on 3rd pin contrast

Return to “HATs and other add-ons”