IOT

How to Interface Nokia 5110 Graphic LCD Display with Arduino

Displaying information is one of the crucial steps in electronic projects. So if you want to display some custom characters or change the font size of the characters or even display some small graphical images, then Nokia 5110 LCD Module is the best option.

Nokia 5110 LCD Module, which is gaining much popularity among electronic enthusiasts and DIY project builders nowadays. The Nokia 5110 LCD was originally designed for use in Nokia Cell Phones, as you would have guessed (originally used in Nokia 5110 Mobile Phone. Hence, the name). In this tutorial, we’ll go over the entire process of connecting a Nokia 5110 to an Arduino.

What is Nokia 51110 LCD Display Module?

Nokia 51110 LCD Display module developed for use with the iconic Nokia 5110/3316 mobile phone. It is capable of displaying alphanumeric characters, drawing lines, other shapes, and even displays a bitmap image. All this is possible only because of 84*48 monochrome. Nokia 51110 LCD Display module consists of an inbuilt PCD8544 interface IC which is easy to use with low-level microcontrollers. The PCD8544 is a low power CMOS LCD controller. Designed to drive a graphic display of 48 rows and 84 columns. This module communicates through the DSPI protocol, hence there is no need for more pins to communicate. This module has an inbuilt added library for Arduino which makes it ideal for novice programmers.

Nokia 5110 LCD module works on 3.3v and hence all pins are only 3.3 v tolerant. So in case if we are using a 5v microcontroller we need to use a logic level shifter. This level shifter acts like a potential divider to access the SPI pins of the display module.  An on-chip generation of the LCD display and a bias voltage are inbuilt in the single-chip LCD display, as a result, minimum, external components and low power consumption is required.

The LCD in the Nokia 5110 comes with a backlight of different colours like green and blue. The bit pattern displays on 50 bytes of Graphic Display Data Ram (GDDR) on the PCD8544 LCD driver. Organized in 6 banks (0 to 5) with each bank containing 84 columns (0 to 83) that store 8 bits of data. Here each bit represents particular pixels on the screen which can programmatically turn ON or OFF.

PCD8544 LCD Controller

Behind the wonderful Nokia 5110 LCD, there lies the PCD8544 LCD Controller from Phillips. It’s a single-chip solution for driving a 48-row, 84-column display. Internally, the PCD8544 Controller has a 504-byte SRAM for storing display data. The SRAM is divided into six banks (Banks 0–5), each of which can store 84 bytes of data. The maximum logic supply voltage is 3.3V. So, proper care must be taken while interfacing with the 5V logic level of Arduino.

 NOKIA 51110 LCD DISPLAY MODULE PIN OUT

The pin out of the Nokia 5110 LCD is as follows

  • RST: Reset Pin
  • SCE: chip select Pin
  • D/C: (Data/Command): This is the mode select pin. Low means command mode and high means Data mode.
  • DN (Data Pin): Serial Data In
  • SCLK: Serial Clock
  • VCC: Input voltage is from 2.7 to 3.3V
  • LED: This LED is the backlight LED. Input voltage is 3.3V
  • GND: Ground

SPECIFICATIONS:

  • Display technology: Dot matrix LCD
  • MCU interface: SPI
  • Screen size: 1.5 inch
  • Resolution: 84*48 pixels
  • Operating voltage: 2.7v-3.3v
  • Operating current: 50mA
  • Current consumption: 6mA
  • Consist of a Philips PCD8544 interface chip for easy interfacing
  • Support decent graphics of bitmap images
  • Available in green and blue backlight
  • Viewing angle: 180 degree
  • supports different types of MCU, such as Arduino, AVR, SPI, M, CS51
  • Transfer rate up to 4Mbps, can full speed write data without waiting time
  • Dimension:10.16*7.62*1.27cm
  • Weight: 10gm

Components Required:

  • Arduino board
  • Nokia 5110 (3310) LCD module
  • 5 x 3.3k ohm resistor
  • 5 x 2.2k ohm resistor
  • Breadboard
  • Jumper wires

Interfacing Diagram Arduino Uno with Nokia 51110 Display Module

The display module contains eight pins that are utilised to connect to Arduino through SPI. The Arduino board’s 3.3V pin is used to power the module. Because these modules operate on 3.3V logic, they do not deliver 5V to the displays’ Vcc pin. Even though the LCD works on 3.3V logic and Arduino on 5V logic, I directly attached the pin of the display to Arduino because it was the only way I could get the LCD to work properly. If needed, a voltage divider can be used to convert 5V to 3.3V, but it only works without the logic conversion.  The connections are pretty simple and straight forward to make. Once you are done with the connections your set-up would look something like this shown below.

The wiring of Nokia5110 LCD with Arduino is explained as follows:

Nokia 5110 LCDArduino
RST3
CE4
DC5
DIN6
CLK7
VCC3.3V
BL3.3V (through 220Ω resistor)
GNDGND

Arduino Coding

Before we begin coding, we must first download a few libraries in order to correctly execute the code. Go to Tools -> Manage Libraries in the Arduino IDE. Look for “PCD8544 Nokia” in the search box.

Select the “Adafruit PCD8544 Nokia 5110 LCD Library” library and click “Install.” “Adafruit GFX Library” is another library that we’ll need to install in order to display graphics on the LCD.

We must now create code after installing these two libraries. The text will be shown on the Nokia LCD using the code below.




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

/* Declare LCD object for software SPI
Adafruit_PCD8544(CLK,DIN,D/C,CE,RST);*/
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);

void setup()
{
/* Initialize the Display*/
display.begin();

/* Change the contrast using the following API*/
display.setContrast(57);

/* Clear the buffer */
display.clearDisplay();

/* Now let us display some text */
display.setTextColor(WHITE, BLACK);
display.setCursor(4,8);
display.setTextSize(1);
display.println(“|Electronics|”);
display.setCursor(28,20);
display.println(“|Hub|”);
display.setCursor(12,32);
display.setTextColor(BLACK);
display.println(“Nokia 5110”);
display.display();
delay(1000);
}

void loop()
{
/* You can implement your display logic here*/
}

Output:

Conclusion:

I hope all of you had become familiar with the Nokia 51110 LCD Display Module and its interfacing with the Arduino Board. In this blog, we just learned how to show bitmap pictures on an LCD using a simple project.  I hope you find this post to be useful.

Leave a Reply

Your email address will not be published.