SINAU PROGRAMMING
SINAU PROGRAMMING
  • Home
  • Source Code
  • Social
  • CONTROL
    • Internet of Think (IoT)
    • ESP
      • NodeMcu
      • Lora
      • WeMos
      • Esp 32 Dev
      • Node 32s
    • Arduino
    • Raspberry
    • Proteus
  • MATLAB
    • MATLAB PROJECT
    • PLC
      • Omron
      • Mitsubishi
      • Siemens
      • Schneider
      • ArduinoPLC
    • Arduino
    • Basic & Doc
  • Contact Us

            RTC (Real time clock) adalah jam elektronik  berupa chip yang dapat menghitung waktu (mulai detik hingga tahun) dengan akurat dan menjaga/menyimpan data waktu tersebut secara real time. Karena jam tersebut bekerja real time, maka setelah proses hitung waktu dilakukan output datanya langsung disimpan atau dikirim ke device  lain melalui sistem antarmuka.

Chip RTC sering dijumpai pada motherboard PC (biasanya terletak dekat chip BIOS). Semua komputer menggunakan RTC karena berfungsi menyimpan informasi jam terkini dari komputer yang bersangkutan. RTC dilengkapi dengan baterai sebagai pensuplai daya pada chip, sehingga jam akan tetap up-to-date walaupun komputer dimatikan. RTC dinilai cukup akurat sebagai pewaktu (timer) karena menggunakan osilator kristal.

Banyak contoh chip RTC yang ada di pasaran seperti DS12C887, DS1307, DS1302, DS3234.


Nah pada tutorial kali ini kita akan mencoba menampilkan tanggal dan waktu pada lcd 16x2.

Langsung saja rangkai projek sesuai dengan di bawah ini:


Lalu masukkan program arduino sesuai dengan yang dibawah ini,lalu compile dan upload.

//sebelum upload program di bawah ini set time dlu rtc13017 di example library yg sudah di download
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <TimeLib.h>
#include <DS1307RTC.h>
LiquidCrystal_I2C lcd(0x27,16,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{ lcd.init();
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("JAM DIGITAL");
  delay(1000);
lcd.clear();
} 
void loop(){
tmElements_t tm;
if (RTC.read(tm)) {
lcd.setCursor(0,0);
lcd.print("TIME =");
lcd.setCursor(7,0);
lcd.print(tm.Hour);
lcd.setCursor(9,0);
lcd.print(":");
lcd.setCursor(10,0);
lcd.print(tm.Minute);
lcd.setCursor(12,0);
lcd.print(":");
lcd.setCursor(13,0);
lcd.print(tm.Second);

lcd.setCursor(0,1);
lcd.print("DATE =");
lcd.setCursor(7,1);
lcd.print(tm.Day);
lcd.setCursor(9,1);
lcd.print("/");
lcd.setCursor(10,1);
lcd.print(tm.Month);
lcd.setCursor(11,1);
lcd.print("/");
lcd.setCursor(12,1);
lcd.print(tmYearToCalendar(tm.Year));
}
delay(1000);
lcd.clear();
} 

 

            namun sebelumya anda  harus upload set time dlu rtc13017 di example library yg sudah di download.

Hasilnya dapat di lihat pada gambar berikut :


Nanti untuk pengembangan projeknya bisa ditambahkan buzzer untuk membuat alarm otomatis. Sekian tutorial pada kali ini terimakasih dan selamat mencoba.

 

Newer Posts Older Posts Home





POPULAR POSTS

  • Skema Power Supply Switching SMPS
  • Proteus 8.5 Full Version Professional
  • Tutorial ILI9341 TFT SPI LCD touch Screen
  • Pulse Oxymetry (SPO2) + Raspberry Pi
  • Serial Communication UART Raspberry Pico (SoftSerial)
  • Artificial Neural Network for Identification MATLAB
  • Menampilkan Text Pada LCD 16x2 I2C Arduino

ABOUT ME

cobabaru

Sinau Programming

SUBSCRIBE & FOLLOW

Training


Contact Form

Name

Email *

Message *

Categories

  • alkes 1
  • Android 4
  • Arduino 35
  • Basic & Doc 12
  • centrifuge 1
  • ESP32 8
  • Internet of Things (IoT) 23
  • LCD TFT SPI 2
  • MATLAB 6
  • Metode kendali 1
  • Modul Charger 1
  • Nextion 4
  • NodeMcu 8
  • oled 1
  • Pattern Recognition 2
  • Pemrograman 2
  • Perbaikan 1
  • PID 2
  • PLC HMI VTSCADA ARDUINO 3
  • PRIVACY POLICY 1
  • Proteus 11
  • Python 1
  • raspberry 5
  • Teknik Elektromedik 2
  • Thingsboard 1
  • Video 5
  • Wemos 4

sinau_programming

Sinau Programming Distributed by Sinau Programming