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.
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
Sorry, this is how I have it wired up:
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.
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.
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.
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.
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
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.
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.
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.
I believe this conversation is all about using the 5110 without a library. Since then, I have been using the Philips PCD8544 library and have never needed to make any changes. This may be because I have always used it for plain text with strokes 1 pixel wide.