Nokia 3310/5110 LCD STM32F4/29 library

This is library for PCD8544 LCD controller. This lcd has been used in Nokia 5110/3310 phones. They are almost free on Ebay and are nice size to be used in your projects.


  • Resolution 84 x 48px
  • Display string
  • 2 font sizes 5 x 7 and 3 x 5
  • Graphic library for lines, rectangles and circles
  • algorithm to update only changed area of display to increase speed
  • driven with SPI
  • Software selectable contrast

Connection to Discovery board

Connect LCD board with Discovery
LCD board Discovery Description
RST PC15 Reset pin for LCD
CE PC13 Chip enable for SPI2
DC PC14 Data/Command pin
DIN PC3 MOSI pin for SPI2
CLK PB10 CLOCK pin for SPI2
VCC 3.3V VCC Power
LIGHT GND If you connect this to GND, backlight is turned on
GND GND Ground


Here are listed public enums, which are used in public functions:


Only public functions are described here


Result after compiling code


Upload code to discovery board. If you did everything correct, then something similar to image on the left should be displayed.

Project is available on Github, download library below.