Skip to content
If this is your first visit, please click here to learn about shipping and delivery.
If this is your first visit, please touch here to learn about shipping and delivery.
84 by 48 pixel Nokia 5110-style graphic LCD module

Getting Useful Graphics from a Nokia 5110 LCD: Memory, Contrast and Clean Updates

An 84 × 48 monochrome LCD has enough pixels for a compact instrument screen, a simple menu or a small trend graph. Its limited resolution encourages clear design, while its modest image storage makes it useful for learning how a graphics buffer works.

The common Nokia 5110-style module uses a PCD8544 controller. Getting useful results depends on three separate tasks: connecting the module correctly, initialising its LCD drive settings and sending graphics in the format the controller expects.

Start with the module you actually have

PMD Way's 84 × 48 Nokia 5110-style graphic LCD is listed as a PCD8544 module operating from 3.3 V. Check the markings on the supplied PCB before connecting it. Similar-looking boards can arrange their header contacts differently or use different backlight connections.

The original Philips PCD8544 datasheet specifies a 2.7–3.3 V controller logic supply. A module connected to a 3.3 V supply is not automatically protected against 5 V signals from another board. Check all control inputs and use suitable level translation where required.

Do not copy a header-number table from a photograph of another module. Make a connection list using the actual board labels and its documentation. Confirm power and ground first, then identify serial data, clock, chip enable, data/command and reset.

Know what the control signals do

The controller receives serial data and clock, with a chip-enable signal selecting communication. A separate data/command input distinguishes instruction bytes from pixel data, and reset establishes a known starting state. These functions explain why a powered screen can remain blank even when its data wire is connected correctly.

For first bring-up, use short connections and a documented example matched to the controller. Confirm the microcontroller's selected pins against the software configuration. Hardware SPI pin assignments depend on the development board; an example for one Arduino model is not a universal wiring diagram.

Leave other peripherals disconnected until the display works by itself. That reduces uncertainty about shared pins, bus selection and power demand. Reintroduce each extra device after recording a working display configuration.

Why a full screen needs 504 bytes

The screen contains 84 × 48 = 4,032 monochrome pixels. At one bit per pixel, the raw image occupies 4,032 ÷ 8 = 504 bytes. The controller organises its display memory into six banks, each holding 84 bytes. Each byte represents a vertical group of eight pixels.

This is different from storing a separate byte for every pixel. A one-byte-per-pixel array would use 4,032 bytes for the same monochrome image. Packing bits saves memory, although the graphics routines must update individual bits correctly.

A software framebuffer is a copy of the desired screen held by the microcontroller. It is additional to the controller's own display memory. Two complete software buffers require 1,008 bytes before counting fonts, variables, communication buffers and the program's stack.

Those arithmetic totals help compare approaches, but inspect the actual library rather than assuming its memory use. It may store fonts in program memory, allocate extra working space or use a different buffering strategy.

Use a pixel test before a detailed bitmap

Create a simple test containing one marked corner, a vertical line, a horizontal line and a small rectangular outline. If these are wrong, a complicated logo will only make diagnosis harder.

For example, moving a test dot downward through eight rows should stay within one group of packed bits before crossing to the next bank. If the dot jumps sideways instead, investigate byte orientation or the address mode. Use the library's documented coordinate system, since a rotation setting can deliberately change how application coordinates map to the screen.

Keep drawing and transmission separate

A buffered graphics library can change its memory without immediately changing the physical display. SparkFun's Nokia graphic LCD example project illustrates drawing operations and an explicit display-update step.

A useful application cycle is to prepare the complete next image in memory, then send it once. Clearing the physical screen, drawing one item, transmitting, drawing another item and transmitting again exposes unnecessary intermediate states.

When a value changes from “100” to “99”, overwrite its complete field or rebuild that part of the buffer. Otherwise the old final digit can remain. Include this transition in your tests; it is more informative than repeatedly displaying a number with the same width.

Partial updates can reduce transmitted data when the library supports them correctly. For a first project, a complete 504-byte image update is often simpler to reason about. Optimise after measuring whether transfer time is actually limiting the application.

Contrast is not backlight brightness

Contrast affects how the LCD pixels appear against their background. The backlight illuminates the display. Changing one cannot reliably repair a problem with the other.

Use the module's supported initialisation and contrast controls. The PCD8544 includes LCD voltage, bias and temperature-related settings, so a copied magic number is not a substitute for the appropriate configuration. Do not increase the external supply voltage to make faint pixels darker.

The backlight is a separate LED load. Establish its polarity, current-limiting arrangement and permitted current for the particular PCB. Do not assume that an LED-labelled header already includes a resistor or that a microcontroller pin can directly carry its current.

SparkFun's graphic LCD guide is a useful illustration of this separation, but its board-specific backlight circuit and pin order should not be transferred automatically to another module. Use a suitable driver when the required LED current exceeds the controller output capability.

Diagnose the visible symptom

First checks for a Nokia-style graphic LCD
Symptom First investigation
Backlight on, no pixels Check logic supply, reset, initialisation, chip enable and whether the buffer was transmitted.
Very dark background Review supported contrast and LCD drive settings rather than changing supply voltage.
Scrambled bitmap Check image dimensions, byte orientation, address mode and transmission order.
Old digit remains Clear or overwrite the full value field in the software buffer.
Intermittent operation Inspect wiring, solder joints, supply stability and logic-level compatibility.

These symptoms suggest starting points, not certain diagnoses. Change one variable at a time and keep the known-good test image available. If a reset temporarily restores operation, investigate why the controller state is being lost instead of repeatedly resetting it to conceal the fault.

Build a compact instrument screen

Reserve the largest text for the measurement, a fixed location for its unit and a small area for sensor or communications status. Test negative values, out-of-range results and missing data before adding decorative graphics.

Browse the graphic LCD module collection with that layout in mind. A well-tested 84 × 48 screen can communicate a great deal when memory use is understood, updates are deliberate and electrical details are checked against the actual module.

Previous article Battery Power for Arduino Projects: Voltage Range, Runtime and Regulator Heat