SOTM
Published © CC BY-NC-SA

Nokia 5110 PCD8544 with Arduino

We have received a number of requests for examples on how to use our Nokia 5110 with any Arduino - so here it goes.

BeginnerProtip30 minutes6,669
Nokia 5110 PCD8544 with Arduino

Things used in this project

Hardware components

Arduino Nano v3 compatible
We did this project with an Arduino Nano 3, but any compatible Arduino will do.
×1
Nokia 5110 PCD8544 Display
×1
Breadboard - Reconfigurable
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic for Nokia 5110 and Arduino

Code

Code to run Nokia 5110 display on Arduino

Arduino
//
// Nokia 5110 LED with PCD8544 for Arduino
// 5 January 2020 
// Author: Gavin Lyons
// Modified for pin layout: dante@serveronthemove.com.au
// Hardware:
//   Arduino
//   8 pin Nokia 5110 84x48 display w PCD8544
//
//   Wiring:
//     Nokia 5110   -> Arduino
//      1 - RST     -> D12
//      2 - CE (CS) -> D11
//      3 - DC      -> D10
//      4 - DIN     -> D9
//      5 - CLK     -> D8
//      6 - VCC     -> 3.3V
//      7 - BL      -> Not used in this example
//      8 - GND     -> GND
// 
// URL: https://github.com/gavinlyonsrepo/NOKIA5110_TEXT 

#include <NOKIA5110_TEXT.h>

//LCD Nokia 5110 pinout left to right
// RST 1/ CD 2/ DC 3/ DIN 4/ CLK 5
NOKIA5110_TEXT mylcd(12, 11, 10, 9, 8);

#define inverse  false
#define UseDefaultFont  false
#define contrast 0xBF // default is 0xBF set in LCDinit, Try 0xB1(good @ 3.3V) or 0xBF if your display is too dark
#define bias 0x14 // LCD bias mode 1:48: Try 0x13 or 0x14

//TEST setup
#define mydelay 1000

void setup() {
  mylcd.LCDInit(inverse, contrast, bias); //init the lCD passed inverse true or false
  mylcd.LCDClear(); //clear whole screen
  mylcd.LCDFont(UseDefaultFont ); //use Font two
}

void loop() {

  //TEST 1 writing text to blocks
  delay(mydelay);
  mylcd.LCDgotoXY(0, 0); // (go to (X , Y) (0-84 columns, 0-5 blocks)
  mylcd.LCDString("VOLTAGE:"); //print to block 0 (0-5 blocks or row bytes)
  delay(mydelay);
  mylcd.LCDgotoXY(0, 1); // (go to (X , Y) (0-84 columns, 0-5 blocks)
  mylcd.LCDString("5.84 "); //print to block 1 indented by two
  delay(mydelay);
}

Credits

SOTM

SOTM

7 projects • 4 followers
Thanks to Gavin Lyons.

Comments