Erceron
Posts: 4
Joined: Thu Feb 14, 2013 9:22 pm

Problems with 2x16 LCD displays

Thu Feb 14, 2013 9:32 pm

I recently purchased a 2x20 LCD display and upon reading up on tutorials (like the RaspberryPiSpy one) I used the code provided (http://www.raspberrypi-spy.co.uk/2012/0 ... ng-python/) and wired up the display to the Pi through a breadboard. The only problem is that nothing shows on the screen. I've checked through all the wiring and code and it seems to be in working order. On the display it shows a line of black boxes on the first line and nothing changes when I run the code.
The display isn't the problem because I bought 2 and they both have the same problems.

Anyone have any idea what I might be doing wrong? It's driving me crazy! :cry:

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Problems with 2x16 LCD displays

Thu Feb 14, 2013 10:11 pm

Just a thought. How is your contrast set? LCD displays have have a contact called V0, which is used for adjusting this by varying the resistor value against ground. Do you have a display where this can be changed? Only other thought: I've had similar problems when microcontroller quarz oscillators are not working, but honestly I don't see this being your problem.

Erceron
Posts: 4
Joined: Thu Feb 14, 2013 9:22 pm

Re: Problems with 2x16 LCD displays

Thu Feb 14, 2013 10:18 pm

I have a variable resistor so I can adjust the contrast and that seems to work fine. I'l try and get a picture of the circuit uploaded soon. As for the code its essentially just the RaspberryPiSpy code they used just with different GPIO pins.

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Problems with 2x16 LCD displays

Thu Feb 14, 2013 10:22 pm

I only ever did this with microcontrollers. Are you using i2c or a classical 4 or 8 bit method? how many wires do you have to attatch? I'm just asking to know, if it's i2c then i would suspect the liklihood of the error being in the wiring to be somewhat smaller, more likely software.

Erceron
Posts: 4
Joined: Thu Feb 14, 2013 9:22 pm

Re: Problems with 2x16 LCD displays

Thu Feb 14, 2013 10:35 pm

I'm using the 4 bit method (pins DB4 - DB7). I did put this project on hold for a bit so I'm just checking again.

PS1981
Posts: 445
Joined: Wed Dec 12, 2012 4:11 pm

Re: Problems with 2x16 LCD displays

Thu Feb 14, 2013 10:41 pm

Then I would advise you check that RS, RW and E are not mixed up.

Erceron
Posts: 4
Joined: Thu Feb 14, 2013 9:22 pm

Re: Problems with 2x16 LCD displays

Fri Feb 15, 2013 12:13 am

Huzzah! It works!

Turns out that using an external power supply of 5v didn't work. Connecting the display up to the pi's internal 5v power supply got it working though :D
Thanks for the help :)

User avatar
bgreat
Posts: 235
Joined: Mon Jan 23, 2012 2:09 pm

Re: Problems with 2x16 LCD displays

Fri Feb 15, 2013 2:38 am

Using an external supply for the display will work. But, you must connect the ground from the external supply to the Raspberry Pi ground. This provides the common reference for the signal levels.

Enjoy!
Bill

Return to “Other projects”