Arduino Nokia Screen not showing anything

Hello everyone, I have watched a youtube video at Arduino Tutorial: Menu on a Nokia 5110 LCD Display Tutorial - YouTube and I am interested in creating a project of mine. I was hoping if you could help me out a bit because for some reason I can not see anything in the screen. The code is the following:

CODE:

#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

boolean backlight = true;
int contrast=50;

Adafruit_PCD8544 display = Adafruit_PCD8544( 5, 4, 3);

void setup() {
  pinMode(7,OUTPUT);

  digitalWrite(7,LOW); //Turn Backlight ON
 
  Serial.begin(9600);
 
  display.begin();      
  display.setContrast(contrast); //Set contrast to 50
  display.clearDisplay();
  display.display();
}

void loop() {
  drawMenu();
}

   
void drawMenu() {
  display.setTextSize(5);
  display.clearDisplay();
  display.setTextColor(WHITE, BLACK);
  display.setCursor(15, 0);
  display.print("MAIN MENU");
  display.drawFastHLine(0,10,83,BLACK);
  display.setCursor(0, 15);
}

Please find the images at the links belofw since I took an error when using the attachments below.

I dont know if the problem occur due to the hardware, software or my stupidity :stuck_out_tongue:

Thank you for your time. Waiting for your reply.

xmarkx:
I dont know if the problem occur due to the hardware, software or

therefore
a) please use an example delivered with the library, they should work together with the library.
b) If a) is not working double check - tripple check your hardware
c) try different contrast values (in steps of 10)

The code looks like rubbish, and I’m not sure it is even worth analysing. I suggest you download the original PCD8544 library from Philips and start over, using the simple helloworld example provided. Note that not all 5110s are wired the same but the connections should be self-evident except the backlight, that you likely don’t need anyway, which is sometimes wired to ground.

There is another library from RinkyDink which I have never used but it may be better documented, and more convenient.

Hello thanks for your messages. I run an example pcdtest.

My connection were based on the following comments:

// Software SPI (slower updates, more flexible pin options):
// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)

I still have noresults and nothing seems to appear at my screen. Any ideas how to proceed?

Thanks

xmarkx:
Any ideas how to proceed?

Other than what's in reply #2, not really.
I see, though, that your display pins are the same as mine. Using the Philips library, the pin arrangement was.

Arduino 5110
3 5 clk
4 4 din
5 3 dc
6 1 RST
7 2 CE

Would you be kind enough to post a link of your library in case I am using an old version or something that I am not aware of?

Thanks

My library is so old that there is no guarantee that it is the same. It is text only. Any changes to the pins are done by editing the library in NP++, not such a good idea. I have already mentioned the Henning Karlsen library which is released through RinkyDink Electronics. Using that, the pins are nominated in your programme.