Arduino Forum

Using Arduino => Displays => Topic started by: yuh25 on Mar 31, 2014, 03:25 pm

Title: Nokia 5110 LCD Not working at all.
Post by: yuh25 on Mar 31, 2014, 03:25 pm
Hi, I got a Nokia 5110 LCD display today and I've been trying to get the thing to work all day. The closest thing I got to displaying anything at all was when I remove the Vcc pin and it just displays line very quickly.

I've used the sketch here: http://playground.arduino.cc/Code/PCD8544
Aswell as any other sketch that I could find.

Thanks.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: Nick_Pyner on Mar 31, 2014, 04:40 pm
The picture isn't too flash, but it looks like you are running it off 5v, it should be 3.3v. There might be other power issues. You have no limiting resistor  for the LEDs. Try running it with the LED wire disconnected
Title: Re: Nokia 5110 LCD Not working at all.
Post by: yuh25 on Apr 01, 2014, 03:11 am
Sorry, this is how I have it wired up:
http://imgur.com/iMbCE8o
Pins on the display from left to right:  RST , CE , DC , CLK , Vcc , BL , Gnd.
I've tried with 10k resistors on the data inputs and LED.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: Nick_Pyner on Apr 01, 2014, 03:21 am

Sorry, this is how I have it wired up:


I bet you didn't, but it does imply you are running it off 3.3v. Try disconnecting the LED.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: yuh25 on Apr 01, 2014, 03:34 am
I've tried.

The only thing I can think that would be wrong is its a dodgy screen or the pins are labeled wrong.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: Nick_Pyner on Apr 01, 2014, 04:25 am
These things are surplus but the fact that you got a fleeting result suggests it is OK. There are variations in the wiring. I got mine going only by accident. Mine is the same order, but the LED is wired to ground. This is one reason why I said disconnect it. You might try grounding it through a 1k resistor.

Your wiring order seems OK.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: yuh25 on Apr 01, 2014, 05:14 am
Didn't appear to do anything with the resistor. =\
Title: Re: Nokia 5110 LCD Not working at all.
Post by: Nick_Pyner on Apr 01, 2014, 05:57 am
OK, I have run out of ideas. If you have it wired like the diagram, it will never work - hence my comment. If it is still wired like the picture, it should.  Running the LED with no resistor isn't a good idea, but I have done it and nothing fried.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: yuh25 on Apr 01, 2014, 06:32 am
Rightio, thanks anyway. I'm just gonna RMA it. =\
Title: Re: Nokia 5110 LCD Not working at all.
Post by: polypagan on Apr 01, 2014, 08:20 pm
I struggled to get mine going too... Almost gave up.

My problem turned out to be the contrast setting.

The fact that you see something on the display as it powers down suggests you have it connected okay (enough).

Arrange to vary the contrast setting during init. Value can range from 0 to 127 (always OR'd with 0x80 before sending).
No need to try all values, just walk through the range.

Mine now works with many different libraries.

Good luck!
Title: Re: Nokia 5110 LCD Not working at all.
Post by: Nick_Pyner on Apr 02, 2014, 12:02 am
Contrast. Yes. I think that could be the answer, even though I never had the situation where there was nothing. I believe Stuart Little's tutorial had a bit about that. Also perhaps here   

http://ianlangelectronic.webeden.co.uk/#/lcd-module-0/4569058582

I believe the contrast requirement varies according to what is on the screen and, consequently, striving for good graphics contrast is not worth the effort. I believe I modified the Philips pcd8544 library with Lewis's contrast setting.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: yuh25 on Apr 02, 2014, 04:44 am
Found the problem. Changing the contrast values seemed to do nothing, so I checked the datasheet and tried changing the values in the init and changed the 'LCD bias mode' to 0x17.
Title: Re: Nokia 5110 LCD Not working at all.
Post by: Nick_Pyner on Apr 02, 2014, 05:13 am
OK. It looks like you have made a significant contribution to the vagaries of the 5110.

I think I started on 0x13 but I now use 0x14 for all displays. Once done, I have never changed it, and I have never had your problem.
Your original code was 0x14 too, so it never dawned on me that the same setting could cause such a difference between different examples.