Digital Clock: University of Mumbai
Digital Clock: University of Mumbai
Digital Clock: University of Mumbai
University of Mumbai
A digital clock displays the time using numbers and it has many applications like cars,
railway stations, houses, offices, etc. in order to provide accurate time and date. In this type
of applications, normally we use RTC (Real Time Clock) ICs to display the time and date
accurately. The circuit displays the time on LCD. For this clock, we can set the time at any
instant. Here, the clock can work in either 24 hour mode or 12 hour mode and the RTC chip
is configured by programming 8051 controller. I will demonstrate two circuits of Digital
Clocks using 8051 Microcontroller: one uses the RTC DS12C887 and the other uses the RTC
DS1307. A digital clock is one that displays time digitally. The circuit explained here displays
time with two ‘minutes’ digits and two ‘seconds’ digits on four seven segment displays. The
seven segment and switches are interfaced with 8051 microcontroller AT89C51. This circuit
can be used in cars, houses, offices etc. As soon as the Vcc supply is provided to this circuit,
the clock starts from 00:00. The time is displayed on four seven segments (in common
anode configuration) by using the concept of multiplexing. This is achieved by
using timer interrupt (Timer0) of AT89C51. which is configured to refresh seven segments.
The segments are refreshed many times in a second for simultaneous display. The clock
runs with a delay of exactly one second. Timer1 has been used to produce a time delay of
one second. The data pins (a–h) of all the segments are interconnected and receive signal
from port P2 of the microcontroller. The control or enable pins (common anode) are
connected to pins 1-4 of port P1 (P1^0 – P1^3).
i
List of Figures
ii
Contents
Abstract i
List of Figures ii
1 Introduction 1
2 Hardware Implementation 2
2.1 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 List of Components 4
3.1 8051 Microcontroller (AT89C51): . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Seven Segment Display: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Crystal Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.4 Push Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Softwatre Implementation 8
4.1 Software used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 working 9
7 Applications 11
Bibliography 13
iii
Chapter 1
Introduction
A clock built with an alarm is called as an alarm clock that includes a preset time to
remember something or awaken people at that time by generating an alarm. Alarm
clocks work as reminders to wake up people in a preset time. These clocks are designed
with buzzers, sensors and lights to alert the persons. The sound of an alarm can be
stopped by pressing the button or automatically stop by producing beep sound in
particular time duration. The modern alarm clocks are designed with convert spy
cameras or AM/FM radios. These alarms can come in both the traditional and digital.
A digital clock is a one kind of clock used to display the time in the form of digital
includes symbols or numerals. These clocks are frequently connected with electronic
drives, but the term digital refers only tothe LCD display, not to the drive mechanism.
The digital clock circuit uses the 50-60 Hz oscillation of AC power. Most digital alarm
clocks display the hour of the day in the form of 12 hours or 24 hours with an indication
of AM or PM. Most digital alarm clocks use LCD display, seven segment
1
Chapter 2
Hardware Implementation
2.1 circuit diagram
2
3
Chapter 3
List of Components
4. Push Button
5. Capacitors
6. Battery
4
3.1 8051 Microcontroller (AT89C51):
AT89C51 is an 8-bit microcontroller and belongs to Atmel’s 8051 family. ATMEL 89C51
has 4KB of Flash programmable and erasable read only memory (EPROM) and 128
bytes of RAM. It can be erased and program to a maximum of 1000 times. In 40 pin
AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit
bi-directional ports, i.e., they can be used as both input and output ports. Except P0
which needs external pull-ups, rest of the ports have internal pull-ups. When 1s are
written to these port pins, they are pulled high by the internal pull-ups and can be used
as inputs. These ports are also bit addressable and so their bits can also be accessed
individually.
Microcontroller senses the signal given from switches and the mode of operation
voting mode it increments the data for corresponding key i.e. respective candidate as
well as it sends signal to display block to indicate one key is pressed. In counting mode
microcontrollers fetches data from memory location and send it to display devices.
5
3.2 Seven Segment Display:
Seven segment LED displays are very popular for displaying numeric information because
they are very attractive and readable from a far distance and wider viewing angle. The
downside is they are resource-hungry. For example, it requires 12 I/O pins of a MCU to
drive a 4-digit seven segment display using a standard time-division multiplexing
technique. Here I present a serial seven segment LED display module that can be used
with any MCU using a 3-wire SPI interface. This particular display has four digits (0.40”
size) and two colon segments (to support time display) display.
8
6
Chapter 4
Softwatre Implementation
7
Chapter 6
working
A digital clock displays the time using numbers and it has many applications like cars,
railway stations, houses, offices, etc. in order to provide accurate time and date. In this type
of applications, normally we use RTC (Real Time Clock) ICs to display the time and date
accurately. The circuit displays the time on LCD. For this clock, we can set the time at any
instant. Here, the clock can work in either 24 hour mode or 12 hour mode and the RTC chip
is configured by programming 8051 controller. I will demonstrate two circuits of Digital
Clocks using 8051 Microcontroller: one uses the RTC DS12C887 and the other uses the RTC
DS1307. A digital clock is one that displays time digitally. The circuit explained here displays
time with two ‘minutes’ digits and two ‘seconds’ digits on four seven segment displays. The
seven segment and switches are interfaced with 8051 microcontroller AT89C51. This circuit
can be used in cars, houses, offices etc. As soon as the Vcc supply is provided to this circuit,
the clock starts from 00:00. The time is displayed on four seven segments (in common
anode configuration) by using the concept of multiplexing. This is achieved by
using timer interrupt (Timer0) of AT89C51. which is configured to refresh seven segments.
The segments are refreshed many times in a second for simultaneous display. The clock
runs with a delay of exactly one second. Timer1 has been used to produce a time delay of
one second. The data pins (a–h) of all the segments are interconnected and receive signal
from port P2 of the microcontroller. The control or enable pins (common anode) are
connected to pins 1-4 of port P1 (P1^0 – P1^3).
8
Chapter 6
Advantages and Disadvantages
6.1 Advantages
Coordinated indications of all clocks at the site with a global universal time
(UTC/GMT);
Synchronous indication of an exact zone time in the pointer and digital formats on
all clocks;
Automatic conversion of clocks during the transition to winter/summer time;
Automatic setting of the clock to the exact time after restoration of power or
liquidation of the accident on a line;
Automatic restoration of the correct indications of the clock at failures or during
power interruption for a period of up to 1 week;
Synchronization of the computer network in accordance with the calendar date and
exact time;
Simplicity of usage that does not require special training of the engineering
personnel.
6.2 Disadvantage
• The disadvantages are that they depend on electricity or batteries where as some
non-digital clocks need only be wound.
9
Chapter 8
Applications
1. Single time period clocks – these allow for a single programmed time period. You
cannot program a quick play finish within a set time following a given amount of
moves. In other words, you cannot add an extra 15 minutes of playing time following
black’s 35th move without manually adjusting the clock. This manual adjustment is
not allowed under FIDE rules. These clocks are fine for quick play, rapid play or blitz
games in which there is a single playing period. They are typically priced at £20-£35
each.
1
0
Chapter 8
1
1
Bibliography
[1] M. Jamali, M. Mirzaie and S. Asghar Gholamian, “Calculation and Analysis of Trans-
former Inrush Current Based on Parameters of Transformer and Operating Condi-
tions”, Electronics And Electrical Engineering, Vol. 3, Page No. 109-111, 2011.
[2] Ayala Kenneth J. “The 8051 Microcontroller Architecture, Programming and Appli-
cations”, 3rd edition, page No.243-257, 2008.
[4] P.L. Mao and R.K Aggarwal, “A Wavelet Transform Based Decision Making Logic
Method for Discrimination Between Internal Faults and Inrush Currents in Power
Transformers”, Electrical Power and Energy Systems, No. 22, pp. 389-395, 2000.
[5] Dharmendra Kumar Singh and Gitanjali Kashyap, “Digital Differential Protection
of Power Transformer”, Digital Application and Contemporary research, Vol. 2, No.
10, 2014.
[6] Narri Yadaiaha and Nagireddy Ravi, “Internal fault detection techniques for power
transformers”, Applied Soft Computing, No. 11, 2011 .
[7] Venkateshan and M. Senthil Kumar, “Power transformer differential protection with
neural network based on symmetrical component”, International journal of commu-
nication and Engineering, Vol. 6, No. 6, 2012.
[8] Ahmed Abdulkader Aziz, Dr. Abduladhem Abdulkareem Ali and Dr. Abbas H. Ab-
bas, “Power Transformer Protection by Using Fuzzy Logic”, Electrical and Electronic
Engineering, Vol. 5, No. 1, 2009.
[9] Iman Sepehri Rad, Mostafa Alinezhad, Seyed Esmaeel Naghibi and Mehrdad Ahmadi
Kamarposhti , “Detection of Internal Fault in Differential Transformer Protection
Based on Fuzzy Method”, American Journal of Scientific Research, No. 32, pp. 17-
25, 2011.
[10] Dr. Howard Silver, “Neural networks in Electrical engineering”, proceedings of the
ASEE New England, 2006.
[11] S.R.Paraskar, M.A. Beg and G.M. Dhole, “Discrimination between Inrush and Fault
in Transformer ANN Approach”, International Journal of Advancements in Tech-
nology , Vol. 2, No. 2, 2011.
1
2
[12] H. Monsef, S. Lotfifard, “Internal fault current identification based on wavelet trans-
form in power transformers”, sciencedirect/Electric Power Systems Research, No. 77,
pp. 1637–1645, 2007.
[13] Enesi Asizehi Yahaya, “Effect of Switching angle on Magnetizing flux and Inrush
current of a Transformer”, IOSR Journal of Electrical and Electronics Engineering
(IOSR-JEEE), Volume 8, PP 20-22, Issue 3 (Nov. - Dec. 2013)
[14] Jawad Faiz and S. Lotfi-Fard , “A Novel-Based Alorithm for Discrimination of Inter-
nal Fsults from Magnetizing Inrush Current in Power Transformers” IEEE Transac-
tions on Power Delivery, Vol. 21, No. 4, October 2006.
[17] Jialong Wang , “Analysis of transformer inrush current and comparison of harmonic
restraint methods in transformer protection”, Protective Relay Engineers, 61st An-
nual Conference, April 2008.
[19] https://www.electrical4u.com.
[20] http://electricalquestionsguide.blogspot.com
1
3