Image of Setting up Nokia 1661 Graphic LCD

Setting up Nokia 1661 Graphic LCD Leave a comment

Introduction

Graphical LCDs are one of the most important components when designing both simple and complex electronic circuits. For basic status indication, a few LEDs or a 7-segment display are enough. But when your device needs to display many parameters at once, LEDs or character LCDs simply aren’t practical anymore — you need a graphical LCD.

When it comes to graphical LCDs, the choices are extremely limited. Not only is the variety tiny, but the prices are astronomical — sometimes so high that they can even kill an entire project!

So, what’s the cheap and practical solution? Keep reading with Eicut!

The Affordable Solution

The trick is to use displays that are produced in huge volumes for the consumer market (not specialized industrial displays). These screens are abundant, widely available, and most importantly — very inexpensive.

A perfect example is old mobile phone displays. They are easily found in mobile spare-parts shops and cost only a fraction of regular graphical LCDs.

In this article, we’re going to use one of the best and cheapest options : the Nokia 1661 LCD.

Introducing the Graphical LCD

Most graphical LCDs sold in the electronics market are monochrome pixel-type (they can only turn each pixel on or off). Color graphical LCDs are usually very expensive because, besides the display itself, you also need to buy a separate controller IC.

Mobile phone LCDs solve both problems at once:

  • They are full-color (65K colors) TFT
  • The driver/controller is already built into the display
  • You only need to send commands and data — no external driver IC required!

Today we will drive the Nokia 1661 LCD:

  • Type: TFT, 65K colors
  • Size: 1.8 inches
  • Resolution: 128 × 160 pixels (~114 ppi)

If for any reason you can’t find the exact Nokia 1661 model, the following phones use exactly the same LCD (same driver, same commands, same 12-pin connector):

  • Nokia 1661 / 1616 / 1662 / 1800 / 5030 / 100 / 101 / 112 / 113
  • Nokia C1-00 / C1-01 / C1-02 / C1-03 / C2-00 / X1-01

The following older Nokia models use the same LCD but with a 22-pin connector (DF23-22). Only the pinout is different — all driving commands and timing are identical:

  • Nokia 5070 / 5200 / 6060 / 6061 / 6070 / 6080 / 6085 / 6086
  • Nokia 6101 / 6102 / 6103 / 6125 / 6136 / 6151 / 7360

Because these displays were used in millions of phones, they are very easy to source and will remain available for years.

Graphical LCD and Hardware Interface

All of the models listed above use the SPFD54124B controller (or a fully compatible clone).

Fortunately, this controller uses a serial interface, so we don’t need many pins to drive it. Unfortunately, it uses 9-bit serial protocol, which means we cannot directly use the standard 8-bit SPI hardware peripheral found in most AVR microcontrollers (though almost all ARM-based MCUs support 9-bit mode natively).

Another very important point: This LCD works only at 3.3 V (both power supply and logic levels). If you apply 5 V to any I/O pin, the built-in controller will be permanently damaged.

🔗Tip

If you’re using a regular Arduino (5 V) or any 5 V AVR board, simply put a 10 kΩ resistor in series on each signal line (RS, CS, SCLK, SDA). This is enough to safely drop the voltage — no need for proper voltage dividers or level shifters.

If your LCD has the 12-pin connector, the pinout is shown in the picture below:

Close-up of TFT display flexible cable with labeled pins
12-pin connector pin out

You can download the Altium library along with the driver board for this type of LCD from the end of this article.

If you are using a model with 22 pins, you can view the pin configuration in the image below.

Schematic diagram of DF23-22 connector pin
DF23-22 connector pin

As shown in the two images above, aside from the power supply and backlight pins, this controller model requires four signal pins. As usual, one is for controller reset, one serves as the chip select (CS) signal, one is the clock (CLK), and the other is the data input (DATA).

The labels SDA and SCL are not related to the I²C interface; they are simply abbreviations for Serial Data and Serial Clock, respectively.

Sample module

The display used in this setup is the Nokia 1661 mobile LCD, whose front and back views are shown in the image below.

Front and back view of small monochrome LCD screen
LCD screen

Please note that this type of LCD has 12 pins.

To make access to the LCD pins easier, Eicut has designed a driver board, and you can download its PCB file from the Downloads section on our website.

Front and back views of a custom TFT LCD
LCD screen

Downloading and Setting Up the Graphical LCD Library

To download the library, visit Eicut’s website and get the project named Nokia‑1616‑1661‑TFT‑Library, or simply click the download link provided in the Downloads section. After obtaining the latest version of the library, the first step is to configure the pins used to initialize the LCD. To do this, edit the following lines in the nokia1661_Hw.h file.

You may freely assign any available pins on your microcontroller:

🔗Tip

Keep in mind that this library supports both AVR and STM32 microcontrollers.

To specify which one you are using, edit the same header file (nokia1661_Hw.h) and modify the macro definitions accordingly.

For example, to select an AVR microcontroller, set them as follows:

This library is compatible with GCC, Keil, and IAR compilers, and it can be easily integrated with HAL, LL, or SPL libraries.

In summary:

  • Download: from Eicut websiteNokia‑1616‑1661‑TFT‑Library
  • Edit hardware header: nokia1661_Hw.h
  • Configure pins and MCU type
  • Supported environments: GCC / Keil / IAR
  • Supported frameworks: HAL / LL / SPL

This setup ensures smooth operation of your graphical Nokia 1616/1661 LCD across different microcontroller platforms.

 

Breadboard setup with Arduino Nano wired to a TFT LCD
Configuring hardware pins

After configuring the hardware pins and connecting the LCD module to the microcontroller, initialization and operation are very simple:

you just need to call the nlcdInit() routine to configure the LCD controller and start using it.

Default Example Program for Library Initialization and Testing

Explanation

  • nlcdInit() → Initializes the LCD controller and prepares it for use.
  • nlcdSetBackgroundColor() and nlcdClear() → Change and clear the display background.
  • nlcdSetFont() → Selects a display font for text rendering.
  • nlcdStringP() → Writes text to the LCD using specific color and position.
  • nlcdSetOrientation() → Rotates the display between 0°, 90°, 180°, and 270°, offering flexible viewing angles.
  • nlcdPixel() → Draws individual pixels to form colored shapes or patterns.

Program Output:

TFT LCD screen showing "Eicut.com" text
LCD display test

The result of the above code—showing different orientations drawing elements—can be seen in the image below, demonstrating successful initialization and basic operation of the Nokia 1661 graphical LCD.

Library Version 2 Update

In the new version of the library, a function for reading the LCD controller registers has been added.

Using this function, you can easily read the LCD ID and status registers.

Function Prototype

Parameters

  • Reg – The address of the register you want to read.
  • Readbuffer – A pointer to the memory location where the received data should be stored.
  • NRead – The number of bytes to read from the LCD controller.

Example: Reading the LCD ID Register

The following example shows how to read the Display ID register from the LCD using the _nlcdRead() function:

This code reads three bytes from the register at address 0x04, typically assigned to the LCD ID register, and stores them in the array ReadID.

TFT LCD screen showing ID Register
Reading the LCD ID Register

Summary:

  • The new _nlcdRead() function enhances the library by adding direct register access capability.
  • It’s useful for diagnostics, LCD identification, and status monitoring.
  • Works seamlessly with the existing Nokia‑1616/1661 TFT driver functions.
🔗Tip

Keep in mind that this library supports both AVR and STM32 microcontrollers.

🔗 Add Support STM32Fxxx

Now Library Nokia-1616-1661 Support STM32Fxxx microcontrollers.
you can use This library in GCC/Keil/IAR with HAL/LL or SPL
for select and set MCUs type and pinout you can edit the nokia1661_Hw.h file with uncomment the LCD_AVR_HW or LCD_STM_HW macro
Click to Download STM32Fxxx Files

🔗Hex For Arduino Nano (ATmege328p)

Add _nlcdRead Function
Read RDDID & RDDST And Show On LCD
Click to Download Hex Files For Arduino Nano

FAQ – Setting up Nokia 1661 Graphic LCD

Why use old mobile phone LCDs like Nokia 1661?

They are full-color TFT (65K colors), have a built-in controller (no extra driver IC needed), widely available, and extremely cheap compared to dedicated graphical LCDs.

What is the resolution and size of Nokia 1661 LCD?

1.8 inches, 128 × 160 pixels resolution (~114 ppi), full 65K colors TFT display.

Which Nokia models use the same LCD?

Same 12-pin: Nokia 1661, 1616, 1800, 5030, C1/C2 series, X1-01 etc.
22-pin version (same controller): Nokia 5070, 5200, 6060, 6101, 6125 etc. All use SPFD54124B or compatible driver.

What controller does this LCD use?

SPFD54124B (or compatible clone) — built-in, supports 9-bit serial interface.

What voltage does the LCD require?

Strictly 3.3 V for both power and logic levels. Applying 5 V will damage the built-in controller permanently.

How to connect it to a 5V microcontroller like Arduino?

Add a 10 kΩ series resistor on each signal line (RST, CS, SCLK, SDA) — simple and safe voltage drop. No level shifter needed.

How many pins are needed to drive the LCD?

Only 4 control pins: RST, CS, SCLK, SDA (9-bit serial). Plus VCC, GND, and backlight pins.

Which microcontrollers are supported by the library?

AVR (ATmega, ATtiny) and STM32 families. Compatible with GCC, Keil, IAR, HAL/LL/SPL.

How to initialize the LCD in code?

Just call nlcdInit() after configuring pins in nokia1661_Hw.h. Then use functions like nlcdClear(), nlcdStringP(), nlcdPixel(), nlcdSetOrientation().

What’s new in Library Version 2?

Added _nlcdRead() function to read controller registers (e.g., Display ID at address 0x04) for diagnostics and verification.

Leave a Reply