Introduction: Displaying and Generating Sine Wave on Nokia LCD 5110 Using Arduino

Displaying a continuous signal on graphics LCD has always been a challenge, this instructable briefly explains the simplest way to generate a Sine wave from Arduino uno and display the continuous wave on Nokia graphics LCD 5110.

Step 1: Components Used

The components along with circuit assembly used in this project are mentioned in detail for an easy follow-up.

1) Arduino Uno:

An Arduino board consists of an Atmel 8-16- or 32-bit AVR microcontroller with complementary components that facilitate programming and inclusion into other circuits. An important aspect of the Arduino is its connectors, which lets users connect the CPU board to a variety of interchangeable add-on modules known as shields.

2) Jumper wires:

Male to male jumper wires are used to build the circuit.

3) Nokia LCD 5110:

The Nokia 5110 is a basic graphic LCD screen for lots of applications. It was originally intended for as a cell phone screen. This one is mounted on an easy to solder PCB.
It uses the PCD8544 controller, which is the same used in the Nokia 3310 LCD. The PCD8544 is a low power CMOS LCD controller/driver, designed to drive a graphic display of 48 rows and 84 columns. All necessary functions for the display are provided in a single chip, including on-chip generation of LCD supply and bias voltages, resulting in a minimum of external components and low power consumption. The PCD8544 interfaces to microcontrollers through a serial bus interface.

Step 2: Circuit / Schematic

Connect the LCD in accordance with the schematic. Also the connections between arduino and lcd are further elaborated in the provided code.

Step 3: Working Video

Step 4: Arduino Code


#include <Adafruit_PCD8544.h>

#include <SPI.h>


float y;
float a; float z;

// pin 7 - Serial clock out (SCLK) // pin 6 - Serial data out (DIN) // pin 5 - Data/Command select (D/C) // pin 4 - LCD chip select (CS) // pin 3 - LCD reset (RST) Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3); // LCD Declaration

void setup() { Serial.begin(9600); display.begin(); display.setContrast(60); display.clearDisplay(); }

void loop() { for (int c=0; c<4; c++) { for (int i=0; i<84; i++) // the LCD is of dimensions 84*48, so the display would cover all the columns of the screen { y=i*0.017453292519943295769236907684886; z = (sin(y*6)*20)+23; display.drawPixel(i, z, BLACK); display.display(); delay(20); } }