Pages: [1] 2   Go Down
Author Topic: Nokia 5110/3310 LCD...?  (Read 2959 times)
0 Members and 1 Guest are viewing this topic.
South UK
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Proffesional Amatuer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok so I bought a 5110/3310 LCD off ebay with one of the level shifting chips, followed this set of instructions http://learn.adafruit.com/nokia-5110-3310-monochrome-lcd/overview to wire it up and stuff, downloaded arduino IDE software and got it up and running it seemed to upload the sketch but nothing happened, my display didnt do anything other than it was illuminated by the back light.

At one point I noticed a flicker with a few pixels on the display I think, but it only did that once.

Being a noob, I dont really know where to start with this one, whats the best way to test the display? what sort of issues could there be with uploading the code?

I dont know where to start!

Please help  smiley-red
« Last Edit: October 01, 2013, 04:37:36 pm by Bugsy_malone_666 » Logged

Just tap the Red wire and the Black wire together and see if we get a spark, then well see if we got some power!

South UK
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Proffesional Amatuer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Bit of an update, tried again tonight just now and its come up with this:

'Adafruit_PCD8544' does not name a type

Quote
pcdtest:30: error: 'Adafruit_PCD8544' does not name a type
pcdtest.pde: In function 'void setup()':
pcdtest:62: error: 'display' was not declared in this scope
pcdtest:74: error: 'BLACK' was not declared in this scope
pcdtest:136: error: 'WHITE' was not declared in this scope
pcdtest.pde: In function 'void testdrawbitmap(const uint8_t*, uint8_t, uint8_t)':
pcdtest:171: error: 'display' was not declared in this scope
pcdtest:186: error: 'display' was not declared in this scope
pcdtest:186: error: 'BLACK' was not declared in this scope
pcdtest:188: error: 'display' was not declared in this scope
pcdtest:193: error: 'WHITE' was not declared in this scope
pcdtest.pde: In function 'void testdrawchar()':
pcdtest:208: error: 'display' was not declared in this scope
pcdtest:209: error: 'BLACK' was not declared in this scope
pcdtest.pde: In function 'void testdrawcircle()':
pcdtest:222: error: 'display' was not declared in this scope
pcdtest:223: error: 'BLACK' was not declared in this scope
pcdtest.pde: In function 'void testfillrect()':
pcdtest:230: error: 'display' was not declared in this scope
pcdtest.pde: In function 'void testdrawtriangle()':
pcdtest:239: error: 'display' was not declared in this scope
pcdtest:242: error: 'BLACK' was not declared in this scope
pcdtest.pde: In function 'void testfilltriangle()':
pcdtest:248: error: 'BLACK' was not declared in this scope
pcdtest:249: error: 'display' was not declared in this scope
pcdtest:253: error: 'WHITE' was not declared in this scope
pcdtest.pde: In function 'void testdrawroundrect()':
pcdtest:260: error: 'display' was not declared in this scope
pcdtest:261: error: 'BLACK' was not declared in this scope
pcdtest.pde: In function 'void testfillroundrect()':
pcdtest:267: error: 'BLACK' was not declared in this scope
pcdtest:268: error: 'display' was not declared in this scope
pcdtest:270: error: 'WHITE' was not declared in this scope
pcdtest.pde: In function 'void testdrawrect()':
pcdtest:277: error: 'display' was not declared in this scope
pcdtest:278: error: 'BLACK' was not declared in this scope
pcdtest.pde: In function 'void testdrawline()':
pcdtest:284: error: 'display' was not declared in this scope
pcdtest:285: error: 'BLACK' was not declared in this scope
pcdtest:288: error: 'display' was not declared in this scope
pcdtest:289: error: 'BLACK' was not declared in this scope
pcdtest:294: error: 'display' was not declared in this scope
pcdtest:296: error: 'BLACK' was not declared in this scope
pcdtest:300: error: 'BLACK' was not declared in this scope
pcdtest:307: error: 'BLACK' was not declared in this scope
pcdtest:311: error: 'BLACK' was not declared in this scope
pcdtest:318: error: 'BLACK' was not declared in this scope
pcdtest:322: error: 'BLACK' was not declared in this scope
Logged

Just tap the Red wire and the Black wire together and see if we get a spark, then well see if we got some power!

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try out my library, read the post for connection details.
http://forum.arduino.cc/index.php?topic=176794.0
Logged


Canberra Australia
Offline Offline
God Member
*****
Karma: 11
Posts: 518
Hardcore Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Also if you would like to try some 5110 code without any libraries this guy has a really good tutorial and a couple of interesting pieces of code. Nice guy too
Pedro smiley-lol

http://ianlangelectronic.webeden.co.uk/#/lcd-module-0/4569058582
« Last Edit: October 01, 2013, 08:27:50 pm by Pedro147 » Logged


Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2268
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Being a noob, I dont really know where to start with this one, whats the best way to test the display? what sort of issues could there be with uploading the code?


I suspect you got the display and library from different sources, and you have to be seriously lucky to get it right first time with the 5110 if you do that.

The fundamental problem is that, while all 5110s look more or less the same, they aren't. They use different pins. Even the wiring for the light can be different. The matter is only made worse by having the pin call in the library rather than in the Arduino sketch.

This is probably the time to get a breadboard to help sort things out and none of this is easy, particularly if you are a noob. But it's worth it.

I had a hard time but found the best start for this is

http://blog.stuartlewis.com/2011/02/12/scrolling-text-with-an-arduino-and-nokia-5110-screen/

It is a limited application but gives a result and no library is involved.

More information is here

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

Ultimately, it makes more sense to use a library. Here is the standard one from Philips. It may be the same as the one you have.

http://code.google.com/p/pcd8544/

I had to edit it for my display. The 1-8 pin order on mine is

RST
CE
DC
DIN
CLK
VCC
LIGHT
GND

If yours is the same, I guess you can use my library and SPI pin arrangement on Arduino.
Logged

South UK
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Proffesional Amatuer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Being a noob, I dont really know where to start with this one, whats the best way to test the display? what sort of issues could there be with uploading the code?


I suspect you got the display and library from different sources, and you have to be seriously lucky to get it right first time with the 5110 if you do that.

The fundamental problem is that, while all 5110s look more or less the same, they aren't. They use different pins. Even the wiring for the light can be different. The matter is only made worse by having the pin call in the library rather than in the Arduino sketch.

This is probably the time to get a breadboard to help sort things out and none of this is easy, particularly if you are a noob. But it's worth it.

I had a hard time but found the best start for this is

http://blog.stuartlewis.com/2011/02/12/scrolling-text-with-an-arduino-and-nokia-5110-screen/

It is a limited application but gives a result and no library is involved.

More information is here

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

Ultimately, it makes more sense to use a library. Here is the standard one from Philips. It may be the same as the one you have.

http://code.google.com/p/pcd8544/

I had to edit it for my display. The 1-8 pin order on mine is

RST
CE
DC
DIN
CLK
VCC
LIGHT
GND

If yours is the same, I guess you can use my library and SPI pin arrangement on Arduino.

True , I was using the Adafruit stuff but sourced my 5110 display from ebay.

I was thinking however, what impact would the pin numbers actually have if I wire it appropriately? I think if I remember my pinout is the same as what you list above,  but I pinned from a 4050 level shifter so that the output of 'CS' for example went to CE (I think thats the same thing right?) and that Din went to Din, so even though the order may have been marginally different the end result should have it wired correctly?


Arduino.cc was down lastnight till I went to bed pretty much so havent had time to test it but maybe I can sort something tonight, ultimately my goal is to get the display to work then maybe code an OBDuino and also a small weather station project, but the first step is all about getting a component to actually work!
Logged

Just tap the Red wire and the Black wire together and see if we get a spark, then well see if we got some power!

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I sourced my display from ebay as well. But it shouldn't matter where it is from, the controller is the same on all of them.
All that may be different is the pin outs on the breakout board. If you take a look at my library, (and the explanation in the H file about pinouts) you'll see that it isn't very difficult.
Simply wire it up correctly and you're good to go.
Logged


Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2268
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


True , I was using the Adafruit stuff but sourced my 5110 display from ebay.

I was thinking however, what impact would the pin numbers actually have if I wire it appropriately?

If you are aware of the differences, that's OK and all you need to do is know how to fix the problem which, in the case of the Philips PCD8544 library, means that is what you have to edit - the PCD8544 library. This means swallowing deeply and going into uncharted territory, but I guess it's not too bad once you've done it.  Things could get messy if you want to change your mind later.

In my case the pin call in the library is:

class PCD8544: public Print {
    public:
        // All the pins can be changed from the default values...
        PCD8544(unsigned char sclk  = 13,  /* clock       (display pin 5) */
                unsigned char sdin  = 11,   /* data-in    (display pin 4) */
                unsigned char dc    = 5,   /* data select (display pin 3) */
                unsigned char reset = 6,   /* reset       (display pin 1) */
                unsigned char sce   = 7);  /* enable      (display pin 2) */

Quote
I think if I remember my pinout is the same as what you list above,  but I pinned from a 4050 level shifter so that the output of 'CS' for example went to CE (I think thats the same thing right?) and that Din went to Din, so even though the order may have been marginally different the end result should have it wired correctly?

No comment, I don't use a level shifter.  Power is from Arduino 3v3 pin, LED display pin 7 is to gnd via 330r and display pin 8 direct to gnd. One of my displays has a blue LED which I find utterly useless and is left disconnected.
Logged

South UK
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Proffesional Amatuer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok well really weird but i plugged it in today to try redoing things and it just started working and displaying the sample script!

Confused!
Logged

Just tap the Red wire and the Black wire together and see if we get a spark, then well see if we got some power!

South UK
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Proffesional Amatuer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unplugged it, plugged it back in, not working again, now I am really confused!
Logged

Just tap the Red wire and the Black wire together and see if we get a spark, then well see if we got some power!

Israel
Offline Offline
Sr. Member
****
Karma: 5
Posts: 282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can't randomly plug in/unplug the LCD power pin for example. This can damage the display.
I did that once with mine, and after resetting the Arduino (to reinitialize the display) it took it several hours to get back to normal.
Logged


Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2268
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it just started working and displaying the sample script!


OK. I guess that might end the discussion on pins and libraries....

Your display could be suss.

I understand these are manufacturer's surplus and not necessarily 100% kosher. All of mine are on a shield. One of them never fails to start, or reset, but might die after a few hours - or days. I have never been able to fix this and now I don't know if it's the display or the shield.  There is only so much re-soldering one can do. The other 5110s are just fine.

The reply #10 above reads like nonsense but may not be, for the same reason.
« Last Edit: October 03, 2013, 07:29:13 pm by Nick_Pyner » Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unplugged it, plugged it back in, not working again, now I am really confused!


You been watching The IT Crowd?

But seriously, why would the bold below be the case?

You can't randomly plug in/unplug the LCD power pin for example. This can damage the display.
I did that once with mine, and after resetting the Arduino (to reinitialize the display) it took it several hours to get back to normal.

I bought 2 of these LCDs, didn't get much chance to play before going out of town on business, but hope to get some time this weekend.
Logged

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

South UK
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Proffesional Amatuer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok well I decided to do my typical thing today and take the screen apart (I do this with many things!) I was surprised to find that once you take the metal retainer off the screen that the PCB underneath contains only the LEDs and a couple of resistors and everything that runs the screen is in the screen.

I decided that there wasnt much you can service, but I wiped the Silicone contact that goes between the board and the screen and hey presto, it now works every time! I have plugged and unplugged multiple times and it has booted and run consistently, so looks like it might have been just dirty contacts when it was made!
Logged

Just tap the Red wire and the Black wire together and see if we get a spark, then well see if we got some power!

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 47
Posts: 2268
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Very interesting. Maybe my troublesome one has a similar problem.

Thanks
Logged

Pages: [1] 2   Go Up
Jump to: