12-Hour Digital Clock Using Arduino
by Adeel Ijaz in Circuits > Microcontrollers
17376 Views, 16 Favorites, 0 Comments
12-Hour Digital Clock Using Arduino
This is a breadboard based project which uses Atmel Atmega 2560 (Arduino Mega) and 16x2 LCD Screen to make a 12-hour digital clock without the need of extra peripherals. We can also set and modify the time with the help of two push buttons.
The whole circuit is powered by +5V and +3.3V of Arduino Mega. The attached code can also be modified for other Arduino Products.
Requirements
The following things are required to get this project done:
1- Arduino Mega or Arduino UNO
2- Potentiometer (eg 5K)
3- LCD 16x2
4- Two Push Buttons
Pin-outs & Wiring
The Pin-outs & Wiring of Arduino Mega or Arduino UNO and other peripheral is attached with this step and also given following:
=============
Arduino => LCD
=============
+5V => VDD or VCC
GND => VSS
8 => RS
GND => RW
9 => E
4 => D4
5 => D5
6 => D6
7 => D7
+3.3V => A
GND => K
====================
Arduino => Potentiometer
====================
+5V => 1st pin
GND => 3rd pin
====================
Potentiometer || LCD
====================
2nd pin => Vo
=> You can set contrast using Potentiometer
====================
Arduino => Push Button 1
====================
+5V => 1st pin
10 => 2nd pin
====================
Arduino => Push Button 2
====================
+5V => 1st pin
11 => 2nd pin
Downloads
Upload the Code
Upload the code to Arduino Mega or Arduino UNO. After uploading the code to Arduino, you will get your output of 12-hour Digital Clock at 16x2 LCD Screen attached with Arduino. The Arduino .ino file is also attached with this step.
After that, you have to set the time using two Push Buttons attached with Arduino.