This post shows how interface ESP8266 NodeMCU development board (ESP12-E module) with Nokia 5110 (3310) graphical LCD screen.
The name Nokia 5110 (3310) comes from Nokia 5110 (or Nokia 3310) mobile phone. The Nokia 5110 LCD has a controller named PCD8544, it is similar to the Nokia 5110 mobile phone LCD, it uses SPI interface protocol and requires 5 control pins (or 4 pins), it’s low cost and easy to use. The resolution of this LCD is 84 x 48 which means it has 4032 pixels. This module works with 3.3V only and it doesn’t support 5V (it’s not 5V tolerant).
- ESP8266 NodeMCU development board
- Nokia 5110 (3310) LCD module
- Jumper wires
Interfacing NodeMCU with Nokia 5110 LCD circuit:
Example circuit schematic diagram is shown below.
The Nokia 5110 LCD which is shown in the circuit diagram has 8 pins (from left to right): RST (reset), CE (chip enable), DC (or D/C: data/command), Din (data in), Clk (clock), VCC (3.3V), BL (back light) and Gnd (ground).
The Nokia 5110 LCD is connected to the NodeMCU board as follows:
RST (reset) pin is connected to pin D0 (ESP8266EX GPIO16),
CE (chip enable) pin is connected to pin D1 (ESP8266EX GPIO5),
DC (data/command) pin is connected to pin D2 (ESP8266EX GPIO4),
DIN (data in) pin is connected to pin D3 (ESP8266EX GPIO0),
CLK (clock) pin is connected to pin D4 (ESP8266EX GPIO2),
VCC and BL are connected to pin 3V3,
GND is connected to pin GND of the NodeMCU.
Interfacing NodeMCU with Nokia 5110 LCD code:
The following Arduino code requires 2 libraries from Adafruit Industries:
The first library is a driver for the Nokia 5110 LCD (PCD8544 controller), and
the second library is Adafruit graphics library.
After the download, go to Arduino IDE —> Sketch —> Include Library —> Add .ZIP Library … and browse for the .zip file (previously downloaded).
The same thing for the other library file.
The Arduino code below is the Adafruit test example for the Nokia 5110 LCD (comes with Adafruit Nokia 5110 LCD driver) with some modifications in order to work with the circuit schematic shown above.
Full Arduino Code: