Complete Guide for Nokia 5110 LCD with Arduino UNO



We will simply print the data on the Nokia 5110 LCD. The circuit diagram for Nokia 5110 Arduino interfacing is shown below. The Nokia 5110 LCD requires 3.3V to operate, so we will have to use resistors to convert the 5V into 3.3V. If you will operate the Nokia 5110 Arduino without the resistors, then it will work but the life span of the LCD will decrease.
  • Connect the pin 1 (RST Pin) to the pin 6 of Arduino through the 10K resistor.
  • Connect the pin 2 (SCE Pin) to the pin 7 of Arduino through the 1K resistor.
  • Connect the pin 3 (D/C Pin) to the pin 5 of Arduino through the 10K resistor.
  • Connect the pin 4 (DIN Pin) to the pin 4 of Arduino through the 10K resistor.
  • Connect the pin 5 (CLK Pin) to the pin 3 of Arduino through the 10K resistor.
  • Connect the pin 6 (VCC Pin) to the 3.3V pin of Arduino.
  • Connect the pin 7 (LED Pin) to the pin 8 of Arduino through the 1k resistor.
  • ( control Light On/Off  via digitalWrite LOW = On , HIGH = off  )
  • Connect the pin 8 (GND Pin) to the GND of Arduino.





#include <PCD8544.h>

// A custom glyph (a smiley)...
static const byte glyph[] = { B00010000, B00110100, B00110000, B00110100, B00010000 };

static PCD8544 lcd;

void setup() {
  pinMode(8,OUTPUT);
  digitalWrite(8,LOW); // LCD light on / off
  // PCD8544-compatible displays may have a different resolution...
  lcd.begin(84, 48);

  // Add the smiley to position "0" of the ASCII table...
  lcd.createChar(0, glyph);
  lcd.setContrast(65);
}


void loop() {
  // Just to show the program is alive...
  static int counter = 0;

  // Write a piece of text on the first line...
  lcd.setCursor(0, 0);
  lcd.print("Hello, World!");

  // Write the counter on the second line...
  lcd.setCursor(0, 1);
  lcd.print(counter, DEC);
  lcd.write(' ');
  lcd.write(0);  // write the smiley

  // Use a potentiometer to set the LCD contrast...
  // short level = map(analogRead(A0), 0, 1023, 0, 127);
  // lcd.setContrast(level);

  delay(200);
  counter++;
}

ความคิดเห็น