Nokia 5110 display, PCD8544
The 84x48 screen out of a Nokia phone. Dark on gray, readable without the backlight, and invisible until Vop is set.
- 8 pins
- In 1 project
- In 1 lesson
The Nokia 5110 display, PCD8544 in brief
What it is, and where it sits on the bench.
The Nokia 5110 module is the 84x48 reflective LCD out of the Nokia 5110 and 3310 phones, on a PCD8544 controller. Its eight pins are RST, CE, DC, DIN, CLK, VCC, LIGHT and GND. It is a 3.3 V part: run VCC from 3.3 V, and from a 5 V Uno put series resistors or a level shifter on its inputs, where an ESP32 drives it directly. The bus is write-only serial, MSB first, so any five pins will do with shiftOut(); on hardware SPI, DIN goes to 11 and CLK to 13 on an Uno, or 23 and 18 on an ESP32. Mokxi models both instruction sets, the six banks of 84 bytes with horizontal and vertical addressing, 504 bytes to a full screen, and the contrast: Vop starts at 0 after reset, nothing shows below about 20, and the ink darkens up to about 70. The mistake everybody makes is never setting Vop and staring at an empty glass. LIGHT lights when driven high, the blue board’s wiring. The red boards that light with LIGHT low, temperature, bias, and the background a real panel darkens past about 90 are not modeled.
- Family
- Displays
- Pins
- 8
8 pins
Named as the editor names them, so a wire lands where you expect it.
How to use the Nokia 5110 LCD with an Arduino
Five signal pins in a row: RST to pin 3, CE to 4, DC to 5, DIN to 6 and CLK to 7, with LIGHT on pin 8 so the sketch can switch the backlight. The bus only goes one way, so any pins will do. The project feeds VCC from the 5 V rail, which the simulation accepts; the real chip is a 3.3 V part, so give it 3.3 V and put resistors in series with its inputs from a 5 V Uno.
Nothing shows until the contrast is set. The three small screens sketch pulses RST, then sends 0x21 for the extended set, 0x80 | 50 for Vop, 0x04 and 0x14, then 0x20 and 0x0C for a normal display. With the Adafruit library the same thing is setContrast(50), and display() after drawing, since the picture is built in the board’s RAM.
An ESP32 runs it at its own 3.3 V with nothing in between; Adafruit_PCD8544 compiles on every board here but the ATtiny85.
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
// CLK, DIN, DC, CE, RST
Adafruit_PCD8544 display(7, 6, 5, 4, 3);
void setup() {
display.begin();
display.setContrast(50);
display.clearDisplay();
display.setTextColor(BLACK);
display.println("Nokia 5110");
display.display();
pinMode(8, OUTPUT);
digitalWrite(8, HIGH); // LIGHT
}
void loop() {}What is true about the Nokia 5110 display, PCD8544, here
In its help article’s own words: what the simulation gets right, and where it stops.
Modeled
The bus. Serial, MSB first, DIN sampled on the rising edge of CLK while CE is
low, and DC read with the eighth bit. CE going high throws away a byte cut short.
There is no data out: nothing can be read back, on the bench or here.
The two instruction sets. The function set (0x20 to 0x27) picks power-down,
vertical addressing and the extended set. In the basic set there are display control
(blank, normal, all on, inverse) and the X and Y address; in the extended set there
are the temperature coefficient, the bias and Vop.
The RAM. Six banks of 84 bytes. A byte is eight pixels stacked down the glass, bit
0 at the top. The address steps along X and wraps into the next bank, or with vertical
addressing down the banks and into the next column, and wraps around the whole RAM at
the end, so 504 bytes after 0x40 0x80 is a full screen.
Contrast is Vop. Below about 20 nothing shows at all; from there the ink darkens
as Vop rises. A sketch that never sets it sees an empty glass, which is the first
thing that goes wrong with a real one.
Reset. RST low puts the chip in its reset state: powered down, display blank,
Vop 0. The RAM keeps what it had.
Not modeled
Past about 90, a real panel darkens its background too until nothing can be read;
here the ink just stays at its darkest. The chip's state before its first reset is
undefined on the bench; here it starts in the reset state. Temperature and bias
change nothing. The red boards, whose backlight lights when LIGHT is pulled low,
are not modeled: this is the blue board's wiring.
From Nokia 5110 LCD, in full.
See the Nokia 5110 display, PCD8544 in a project
One built-in project uses it. It opens in the editor, already wired.
Where it turns up in a lesson
One lesson places it in its own circuit.
The boards it is shown on
This board has a built-in project with the Nokia 5110 display, PCD8544 in it.
The rest of the bench
Every one of these is drawn and simulated the same way.
Wire up the Nokia 5110 display, PCD8544
Open the editor and push it into the breadboard. It is free, and it runs on your own machine.