Arduino UNO used to controlling digital clock (clock and date), and the results are displayed to the LCD which type 5110 LCD. This type of LCD is also used on the display of Nokia 5110 so this is a part of Nokia 5110 phone. Well on this project we will make interfacing between LCD Nokia with Arduino. The price is relatively cheap. Communications are also not too difficult because it is supported by SPI mode pin (Serial Peripheral Interface).
Nokia 5110 LCD Specification
- 48 x 48 Dimension
- 3.3 V Input Voltage
- PCD8544 Controller
LCD Nokia 5110 Module | Source
Hardware Requirement
- Nokia 5110 LCD
- RTC DS1307 Module (the other is also compatible)
- Arduino UNO
- Power supply +5 Volt
- Jumper
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <Wire.h>
#include <DS1307.h>
// Koneksi pin SPI Arduino - LCD Nokia 5110 :
// 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);
void setup() {
Serial.begin(9600);
display.begin();
display.setContrast(50);
delay(100);
RTC.start();
}
void loop() {
display.clearDisplay();
display.setTextSize(1);
display.println("Jam :");
//------------------------------
display.setTextSize(2);
display.setCursor(10,10);
display.print(RTC.get(DS1307_HR,true));
display.print(":");
display.print(RTC.get(DS1307_MIN,false));
display.setTextSize(1);
display.setCursor(20,35);
display.print(RTC.get(DS1307_DATE,false));
display.print("/");
display.print(RTC.get(DS1307_MTH,false));
display.print("/");
display.print(RTC.get(DS1307_YR,false));
display.display();
delay(1000);
}
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <Wire.h>
#include <DS1307.h>
// Koneksi pin SPI Arduino - LCD Nokia 5110 :
// 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);
void setup() {
Serial.begin(9600);
display.begin();
display.setContrast(50);
delay(100);
RTC.start();
}
void loop() {
display.clearDisplay();
display.setTextSize(1);
display.println("Jam :");
//------------------------------
display.setTextSize(2);
display.setCursor(10,10);
display.print(RTC.get(DS1307_HR,true));
display.print(":");
display.print(RTC.get(DS1307_MIN,false));
display.setTextSize(1);
display.setCursor(20,35);
display.print(RTC.get(DS1307_DATE,false));
display.print("/");
display.print(RTC.get(DS1307_MTH,false));
display.print("/");
display.print(RTC.get(DS1307_YR,false));
display.display();
delay(1000);
}
How it Works
1. Connect the Arduino with Peripherals needed
2. Plug in the Power Source on the device
3. Compile and upload the script program above to your arduino
4. Lcd will display Clock and date with real time data
Video for Pro II - 28 Digital Clock using Nokia 5110 LCD (Arduino Based)
Download required file
No comments:
Post a Comment