Connecting a LCD in Raspberry Pi : the leap less than €10 !

For once, We are not going to do a tutorial on how to install this or that tool but enjoy the Raspberry Pi GPIO interface to connect a LCD. Electronics, a first for me !

Connexion d'un écran LCD au Raspberry Pi : le grand saut !

Then I have to say that I start a little to regret my lack of attention in the course of physics/electronics of my youth short ! Result ,now, resistance, transistor and other “shift register” look like a mixture of Chinese and Uzbek ! In short I understand nothing. Yet by reading the blog of Idleman, and more particularly this article on an LCD screen, I wanted to like the big ones !

So I spent command on the other side of the globe for a small LCD for the sum of € 4.13 postage included. Over a few female-female cables for € 3.74 always postage included. Once the received packet, It was therefore necessary to move to the weld ! And there was also a first, especially with the soldering iron of my grand father who must have lived well given his head :

Connexion d'un écran LCD au Raspberry Pi : le grand saut !

The same seen from the front :

Connexion d'un écran LCD au Raspberry Pi : le grand saut !

I still have progress to make but the welds are in place, remains to connect it to the Raspberry ! For this, the blog of Idleman, always, has a clear and effective ultra schema :

Le schéma d'idleman sur la connexion de l'écran au Raspberry Pi

The schema of idleman on the connection of the screen to the Raspberry ft

A big thank you because here is the result :

Connexion d'un écran LCD au Raspberry Pi : le grand saut !

Now remains to test everything :

  1. Install the C library that will allow easy access to the GPIOapt-get update port && apt-get upgrade
    apt-get update && apt - get upgrade apt - get install git-core git clone git://git.drogon.net/wiringPi cd wiringPi git pull origin. / build
  2. Load the example of Idleman blog
    wget http://projet.idleman.fr/domopi/data/piScreen/lcd.zip unzip lcd.zip

    You now have a lcd directory that contains the program ‘screen‘ which will allow to send text on the screen.

Problem : the contrast

Big disappointment at the first launch of the command : nothing on the screen. Watching welds, It looked ok … By browsing the comments, It seems that each screen requires a rule.

So I went into the code, in the line that contains :

LcdWrite(LCD_C, 0x 98 );  // Set LCD Vop (Contrast).

And I modified the value of this line, in departing from the value 0x00 and then recompiling the program to repeat a test.

g    screen.cpp o screen - lwiringPi ; ./screen p Test

Each time I increase the value of 0x10 (0x 00, 0x 10, 0x 20, etc.), recompile and retested. It allowed me to find the value of my contrast between 0xB0 and 0xC4 (wholesale) :

Connexion d'un écran LCD au Raspberry Pi : le grand saut !

Phew !

This is my first electronic experience with Raspberry Pi ! J’avoue maintenant ne pas trop savoir quoi en faire mais j’ai de l’imagination 🙂 Il y a des possibilités avec des librairies et pourquoi pas interagir depuis un site web

At your soldering irons ! 🙂

Like this article ? Bear with me on patreon!

You may also like...