Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Complete Sensor Guide
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Tech Terms
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • White Papers
  • Guest Post Guidelines
  • Advertisers
    • Advertise
    • PR Submissions
    • Eblast Submissions
  • Subscribe

Making Clock and Calendar using Arduino, 4×4 Keypad and 16×2 lcd

By EG Projects May 18, 2019

The post explains about how to make clock and calendar using internal timers of arduino uno. No external RTC(real time clock) is used on the project. Only Arduino internal tick timer(delay function) is utilized to build clock and calendar system with arduino uno. Clock and calendar with Arduino is a complex project, since the code is too lengthy it will be difficult to understand the code flow. Before beginning i assume that you have basic knowledge of number of days in a week, number of weeks in a month, number of months in a year, number of days in months, number of days in a year and about leap year. The project clock and calendar with arduino is designed keeping in mind all the key features of clock and calendar. If you know about all the key features of clock and calendar than you can easily understand the code below. 
Arduino clock and calendar

Arduino clock and calendar

Arduino clock and calendar – project requirements

  • Arduino Uno.
  • 16×2 lcd. 
  • Potentiometer to adjust lcd contrast.
  • 4×4 keypad to adjust time and date.

Arduino clock, calendar working principle and schematic

Time and date are displayed on 16×2 character lcd. To set time and date a 4×4 keypad in interfaced with arduino to input the date and time. Character lcd 16×2 is interfaced with Arduino(Microcontroller board) in 4-bit mode. Coulombs of keypad are connected to Pin 0,1,2,3 of arduino and rows are connected to Pins 4,5,6 & 7. Circuit diagram of the project is given below. Lcd data pins are connected to arduino pins#8,9,10,11. Lcd rs(register select) pin is connected to pin#13 of arduino. Lcd E(enable) pin is connected to pin#12 of arduino. Lcd r/w(read/write) pin is grounded directly, to only perform the write operation, no read operation.
Clock and Calendar with arduino - circuit diagram

Clock and Calendar with arduino 4×4 keypad and 16×2 lcd- circuit diagram

How arduino clock calendar system works

When you first upload the code/sketch in arduino uno. A message will pop up on 16×2 character lcd asking to input date (year,month,day) and time(hour,minute). You have to enter the current date and time. Once you input the time and date clock will start working automatically. 
​

After the time input seconds will be displayed on lcd and starts to increment one by one. When seconds reach to 60 a minute will be incremented and seconds starts to count again from 0. When hours reaches to 24 date will be incremented. When date reaches the month end month will be incremented and when its end of December year will be incremented. All the months and year days logic are included in the code. Code has the ability to recognize a leap year and increment calendar days like leap year.

Adjusting arduino clock time and calendar date

If you want to adjust time and date at any time just press 1 on keypad. A message will popup on 16×2 character lcd asking to input time and date. If you input any wrong information like you input seconds=70 or minutes=63 System will take it as an error and inform you at the instance that you inputted the wrong data. All the necessary checks are included in the code.
Its impossible to explain each and every statement of the code. I will recommend you to go through the tutorials below. The Code below is written using the same concepts explained in the tutorials below.

  • How to display Text on 16×2 lcd.
  • 4×4 keypad with arduino.
  • Character lcd in 4-bit mode with arduino

Note: I am using 4×4 keypad in my project. Since their are 16 buttons in 4×4 keypad 4×4=16 and I require only 10 buttons for digits. So i used first ten buttons of keypad. Remaining six are void. Their is nothing on them if you press them nothing will be going to happen. ​

Arduino clock calendar buttons functions

  • BUTTON 1 – Scanning 1 ( first row first coulomb)
  • BUTTON 2 – Scanning 2 ( first row second coulomb)
  • BUTTON 3 – Scanning 3 ( first row third coulomb)
  • BUTTON 4 – Scanning 4 ( first row fourth coulomb)
  • BUTTON 5 – Scanning 5 ( second row first coulomb)
  • BUTTON 6 – Scanning 6 ( second row second coulomb)
  • BUTTON 7 – Scanning 7 ( second row third coulomb)
  • BUTTON 8 – Scanning 8 ( second row fourth coulomb)
  • BUTTON 9 – Scanning 9 ( third row first coulomb)
  • BUTTON 10 – Scanning 0 ( third row second coulomb)  
  • BUTTON 11 – void-nothing-is empty ( third row third coulomb)
  • BUTTON 12 – void-nothing-is empty ( third row fourth coulomb)
  • BUTTON 13 – void-nothing-is empty ( fourth row first coulomb)
  • BUTTON 14 – void-nothing-is empty ( fourth row second coulomb)
  • BUTTON 15 – void-nothing-is empty ( fourth row third coulomb)
  • BUTTON 16 –  void-nothing-is empty ( fourth row fourth coulomb)
Find more clock and calendar projects. Each project contains free source code and circuit diagram of the project.  

Clock and calendar with 89c51 microcontroller

Download the project code and arduino sketch .ino file. Please give us your feed back on the project. If you have any queries regarding post please write them below in the comments section.
Watch the project video Here

                                                                                    Clock-Calendar files


Filed Under: Arduino Projects, Microcontroller Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

Log in to leave a comment:

Lost your password?

Don't have an account? Register here

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Wide Bandgap Semiconductors
Moving from silicon to GaN or SiC feels like a whole new ballgame, doesn’t it? It isn’t just about faster switching; it’s about managing the layout parasitics and thermal realities that come with that speed. This month’s Tech Toolbox features a curated eBook that tackles these design hurdles head-on.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS feed: EDABOARD.com Discussions. EDABOARD.com Discussions.

  • voltage amplifier for a signal generator
  • Flyback converter working incorrectly
  • ECAL cable position strategy usage
  • What do they connect Y capacitors to in ships?
  • PNA causality improved significantly reason

RSS feed: Electro-Tech-Online.com Discussions Electro-Tech-Online.com Discussions

  • PIC code for 2.42" I2C OLED Display?
  • Want Thermal Camera with Fixed Thermal Span option
  • Samsung C21RJAN ceramic hob BUZZER got quieter
  • Semi-automatic battery handler
  • baud rate vs maximum cable length

Featured Tutorials

LoRa and LoRaWAN: A Complete Guide to Wireless Communication

  • Best practices for securing LoRa networks
    Best practices for securing LoRa networks
  • Understanding LoRa architecture: nodes, gateways, and servers
    Understanding LoRa architecture: nodes, gateways, and servers
  • Revolutionizing RF: LoRa applications and advantages
    Revolutionizing RF: LoRa applications and advantages
  • How to build a LoRa gateway using Raspberry Pi
    How to build a LoRa gateway using Raspberry Pi
  • How LoRa enables long-range communication
    How LoRa enables long-range communication
  • How communication works between two LoRa end-node devices
    How communication works between two LoRa end-node devices
More Tutorials >

Recent Articles

  • Nuvoton and Qt Group add MCU HMI support
  • MicroStrain by HBK adds compact inertial sensors
  • Allegro MicroSystems expands 48V adas portfolio
  • SemiQ previews 1700 V SiC module
  • pSemi adds wideband RF switch

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2026 Arrowfly LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Arrowfly
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Complete Sensor Guide
      • Engineering Deep Dives
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Tech Terms
    • Webinars & Digital Events
  • Resources
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • White Papers
  • Guest Post Guidelines
  • Advertisers
    • Advertise
    • PR Submissions
    • Eblast Submissions
  • Subscribe