Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

Nokia 5110 LCD with Raspberry Pi Pico — MicroPython framebuf driver

Drive a Nokia 5110 (PCD8544) LCD from a Raspberry Pi Pico on SPI0 in MicroPython: a framebuf driver, text, and a live graph of chip temperature and VSYS.

MicroPythonVerified — micropython (mpy-cross v1.29.0), 3 Nov 2026Compile-only

Community draft — report a mistake

The Nokia 5110 is an 84×48 monochrome LCD that runs on 3.3 V and draws almost no power — a good match for a battery-powered Pico. It talks SPI, here on SPI0 (GP18/GP19) with CE, DC and RST on three more GPIOs.

The included driver plugs into MicroPython’s framebuf, so text(), line() and pixel() all work. The demo shows the RP2040’s temperature, the VSYS voltage and a scrolling temperature graph.

Wiring

Raspberry Pi PicoOnly the pins used are shown · 3.3 V logicNokia 5110 LCD (84×48, PCD8544)330 ΩGND3V3GP21GP20GP19GP18GP17RSTCEDCDINCLKVCCBLGND
Also needed: 330 Ω resistor.
Every connection
Raspberry Pi PicoNokia 5110 LCD (84×48, PCD8544)WireNotes
GP21RSTpurplePhysical pin 27.
GP17CEorangeChip select, physical pin 22.
GP20DCyellowPhysical pin 26.
GP19DINgreenSPI0 TX, physical pin 25.
GP18CLKblueSPI0 SCK, physical pin 24.
3V3VCCred3V3 is pin 36. The PCD8544 is a 3.3 V chip — a direct match for the Pico.
GNDBLblackVia 330 Ω — Red boards light the backlight with BL to GND. Blue boards: BL through 330 Ω to 3V3 instead.
GNDGNDblack

3.3 V (2.7–3.3 V) part, 3.3 V board. The PCD8544 is a 3.3 V chip and its inputs are not 5 V tolerant. ESP32 and Pico connect directly. On an Uno power it from 3.3 V and drop the five signal lines through a level shifter (or 10 kΩ series resistors on RST, DC, DIN, CLK and 1 kΩ on CE as a quick fix).

Board quirks

  • The PCD8544’s memory layout is the same as framebuf.MONO_VLSB, so the driver (written for FlashReady, MIT — copy pcd8544.py to the board) just draws into a framebuffer and sends 504 bytes.
  • Contrast differs from glass to glass. If the screen is blank or solid black, change contrast=0x3F in steps of 4 between 0x30 and 0x45.
  • The plain Pico can measure its own supply: ADC(29) reads VSYS through an on-board ÷3 divider. (On a Pico W GP29 is busy with the wireless chip.)
  • DC and RST are on GP20/GP21 rather than GP16, because SPI0 claims GP16 as its MISO pin.

Code

main.pyMicroPython
# Nokia 5110 LCD (PCD8544, 84x48) on a Raspberry Pi Pico (MicroPython, hardware SPI0).
# Wiring: VCC -> 3V3 (pin 36), GND -> GND, CLK -> GP18 (pin 24, SPI0 SCK), DIN -> GP19 (pin 25, SPI0 TX),
# CE -> GP17 (pin 22), DC -> GP20 (pin 26), RST -> GP21 (pin 27),
# BL -> 330 Ohm -> GND on most red boards (blue boards: BL -> 330 Ohm -> 3V3).
# Copy pcd8544.py to the board too.
from machine import Pin, SPI, ADC
import time
from pcd8544 import PCD8544

spi = SPI(0, baudrate=2_000_000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(19), miso=Pin(16))
lcd = PCD8544(spi, cs=Pin(17), dc=Pin(20), rst=Pin(21), contrast=0x3F)  # try 0x30-0x45 if faint/black
temp = ADC(4)  # RP2040 internal temperature sensor
vsys = ADC(29)  # plain Pico only: GP29 = VSYS / 3


def chip_c():
    return 27 - (temp.read_u16() * 3.3 / 65535 - 0.706) / 0.001721


history = []
while True:
    t = chip_c()
    v = vsys.read_u16() * 3.3 / 65535 * 3
    history = (history + [t])[-84:]
    lcd.fill(0)
    lcd.text("Pico 5110", 0, 0)
    lcd.text("{:.1f}C".format(t), 0, 10)
    lcd.text("{:.2f}V".format(v), 44, 10)
    lo, hi = min(history), max(history)
    span = max(hi - lo, 0.5)
    for x, val in enumerate(history):  # little temperature graph in the bottom 28 rows
        y = 47 - int((val - lo) * 27 / span)
        lcd.pixel(x, y, 1)
    lcd.show()
    print("Chip {:.1f} C  VSYS {:.2f} V".format(t, v))
    time.sleep(1)

Expected serial output

REPL / Thonny shellOutput
Chip 30.9 C  VSYS 4.92 V
Chip 31.0 C  VSYS 4.92 V

Common errors

Blank or completely black screen

Contrast. Try values from 0x30 to 0x45. Also check RST is on GP21 — without a reset pulse the PCD8544 ignores everything.

Backlight doesn’t light

Your board switches BL the other way. Move the BL resistor from GND to 3V3.

↑↓ to move · Enter to open