Sunteți pe pagina 1din 14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

ELECTRONICS HUB
P R OJ E C T S | T U TO R I A L S | C O U R S E S

HOME

PROJECTS

CALCULATORS

MINI PROJECTS

COURSES

FREE CIRCUITS

TUTORIALS

SYMBOLS

DIY

CONTACT US

HOME FREE PROJECT CIRCUITS MINI PROJECTS DIGITAL CLOCK CIRCUIT USING 8051 AND DS12C887

Digital Clock Circuit using 8051 and


DS12C887
OCTOBER 20, 2015 BY ADMINISTRATOR 13 COMMENTS

Contents [hide]
1 Circuit Principle:
2 Circuit Diagram:
3 Circuit Components:
4 Circuit Design:
5 DS12C887 Real Time Clock:
6 Pin Description:
7 RTC Address Map:
8 How to Operate?
9 Circuit Applications:
10 Download Project Code
11 Related Articles

Digital clock displays the time using numbers. This circuit is used in many applications like
cars, railway stations, houses, o ces, 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
http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

1/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

accurately. This circuit displays the time on LCD. For this clock, we can set the time at any
instant. ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails
Here the clock works in 24 hour mode and the RTC chip is con gured
by programming
GetFreeCourses
8051 controller.

Circuit Principle:
Here 8051 controller continuously reads the data from Real time clock and process it in correct
order to display the time on LCD. INT1 of the 8051 controller is used to set the time to the
digital clock. If you make P3.3 pin LOW then interrupt arises and set_time function is called to
set the time. To set the time to the clock use P1.4 and P1.5 pins. P1.4 is used to vary the hours
and P1.5 is used to vary the minutes. After setting the time make P1.6 high to run the clock with
the time set by user.

Related Post:[Digital Stopwatch Circuit]

Circuit Diagram:

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

2/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

Circuit Diagram of Digital Clock using RTC DS12C887 and 8051 Microcontroller
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails
Circuit
Components:

GetFreeCourses

8051 microcontroller
Project PCB
Programming cable
DC Battery or 12V, 1A adaptor
DS12C887 RTC IC
16*2 alphanumeric LCD
Push buttons 4
Slide switches 3
2 ceramic capacitors 33pF
12 MHz crystal
Electrolytic capacitor 10uF, 16V
Resistor (1/4 watt) 10k
Pot 10k
5V DC power supply circuit
Single pin connecting wires

Circuit Design:
The circuit shows you how interface RTC IC to the 8051 controller. Port P0 is used as a data
port of Real time clock. Port P2 of controller is connected to the data pins of LCD. Pins P1.1,
P1.2 and P1.3 of controller are connected to the RS, RW, EN pins respectively. P1.0 is connected
to the RESET of RTC. Push buttons are connected to the P1.4 and P1.5. These are used set the
time. P1.6 is con gured as START pin used to run the clock with time set by the user. P3.3 is
connected to the push button used to call the set_time function.

DS12C887 Real Time Clock:


This IC is used most of the applications to provide accurate time and date. This IC provides the
time in both 12 hour mode and 24 hour mode. This IC also provides calendar components day,
month and year. This RTC uses internal lithium battery to keep the time and date updated
when power is failed. This IC has 128 bytes of RAM memory. In these 128 bytes of RAM 14
bytes are used for time, date and registers. Remaining 114 bytes are used to store general
purpose data.
The control registers of RTC are accessible only when the power is applied from external
source. This IC requires more than 4.25V power supply and the control registers are accessible
http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

3/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

after 200ms when external power is supplied.


ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

DS12C887 IC

Pin Description:
MOT: It is a bus type selection pin used to select between Intel and Motorolabus types.
This pin is connected to VCC to select Motorola bus type and connected to GND or
unconnected to select Intel bus type.
2, 3:Unused pins
4 11 (AD0 AD7): These pins are bidirectional address and data lines of RTC. On these
pins address is present in the rst portion of cycle and data is present in the second
portion of bus cycle.
12 (GND): This pin is connected to Ground.
13 (CS): This pin must be low to access the chip during read and write operations.
14 (AS): The high pulse on this pin is used to demultiplex the data and address.
15 (R/W): This pin is used for read or writes operations.
16: Unused pin
17 (DS): This is a Data Strobe pin.
18 (RESET): The low pulse on this pin resets all the ags and interrupts but it does not
http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

4/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

a ects time and date.


19 (IRQ): Thisis active low pin used as an interrupt input to the controller.
GetFreeCourses
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

20 22: Unused pins

23 (SQW): Used to generate square wave with prede ned frequencies


24 (VCC): This pin is connected 5V supply

RTC Address Map:


This RTC has 128 bytes of RAM with addresses 00H 07H. The rst ten locations (00 09) are
used for clock, calendar and alarm data. 0A 0D address locations are used for status and
control registers. Remaining address locations are used to for general data. The following table
shows the address locations for clock, calendar and alarm.

Address Locations for Time, Date and Alarm

This IC has 4 control and status registers namely register A, register B, Register C, register D.
We need to con gure all these registers to get the accurate time and date. In order to
con gure these registers go through the DS12C887 Datasheet

How to Operate?
1. Initially burn the program to the 8051 microcontroller
2. Now give the connections as per the circuit diagram
3. Switch on the board supply
4. Now you can observe the time on LCD. If you want to set the time make the start pin low
and press the push button connected to the P3.3
5. LCD shows set time message. Now use push button which is connected to P1.4 to set
hours and use other push button to set minutes.
6. Now make start pin high to run the clock.

Circuit Applications:

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

5/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

Circuit Applications:
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

This project is used in o ces, houses, hotels and auto mobiles to display the time and

date.
We can also set the alarm in this project with a little modi cation.

Download Project Code


Related Articles

Digital Voltmeter using

Water Level Controller

Interfacing GPS with

Interfacing 162 LCD

8051 Microcontroller

using 8051

8051 Microcontroller

with 8051

Microcontroller

Random Number

Interfacing DC Motor

Celsius Scale

8 Channel Quiz Buzzer

Generator using 8051

with 8051

Thermometer using

Circuit using

Microcontroller

AT89C51 and LM35

Microcontroller

FILED UNDER: 8051 MICROCONTROLLER, ELECTRONICS, EMBEDDED, FREE PROJECT CIRCUITS, MINI PROJECTS

Comments

David says
NOVEMBER 20, 2015 AT 4:30 AM

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

6/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

I want to construct the project


ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

Reply

GetFreeCourses

David says
NOVEMBER 20, 2015 AT 5:15 AM

I want to construct this project


Reply

shweta says
NOVEMBER 21, 2015 AT 7:02 AM

Why you need this project code?


because RTC is part of my project
Are you trying to make the same project or di erent one.
No I am trying di erent project , basically my project is about weather station
Give us more details about your project
My project is about weather station , at which it is required to take sensors
value(temperature, humidity,wind speed and direction) and display it along with time and
date on LCD ,
Reply

dheerajmuttin says
DECEMBER 11, 2015 AT 10:11 AM

its is great project for hobby


its shiw working of rtc clock
i want to do it my self
http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

7/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

Reply
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

k.snehitha says
JANUARY 7, 2016 AT 10:06 AM

iam interested to do this as my mini project., i want to do same project


Reply

sachin w says
JANUARY 19, 2016 AT 7:50 AM

I want to construct this project


Reply

Ally says
JANUARY 24, 2016 AT 2:41 PM

Hello!
Thank u for this!
Am interested in this project, i prefer to try it my self.
Reply

Ally says
JANUARY 24, 2016 AT 2:44 PM

Hello!
I want to try it.
http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

8/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

Reply
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

Racheal says
FEBRUARY 6, 2016 AT 6:56 AM

Since Im doing electronics engineering, I wanted to learn how 8051 micro-controller


projects are done. I am making this project for self analysis and to gain knowledge. hence I
want to start from basic digital clock.
Reply

S. S. Patil says
FEBRUARY 24, 2016 AT 2:25 AM

It is a part of my project
I am trying same project.
Reply

Admin says
MARCH 2, 2016 AT 5:08 AM

Download the code from article itself.


Reply

S. S. Patil says
FEBRUARY 24, 2016 AT 2:28 AM

because i need a project based on microcontroller


http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

9/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

Di erent
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

Searching

GetFreeCourses

Reply

Anusha says
MARCH 2, 2016 AT 2:43 AM

code is uploaded in the project


Reply

Leave a Reply
Your email address will not be published. Required elds are marked *
Comment

Name *

Email *

Website
http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

10/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

I'm not a robot


reCAPTCHA
Privacy - Terms

POST COMMENT

Search this website

COMPLETE STEP BY STEP GUIDE

Give us Feedback About This Free Course.

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

11/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

ElectronicsHub
YouTube

7K

Electronics Hub
Follow

+1

+ 75,684

SUBSCRIBE FOR FREE PROJECT CIRCUITS

Enter your email address:

SUBSCRIBE

Delivered by FeedBurner

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

12/14

6/25/2016

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

ElectronicsHub
609,851likes

ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails

GetFreeCourses

LikePage

SignUp

Bethefirstofyourfriendstolikethis

GENERAL

PROJECTS

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

PROJECTS

13/14

6/25/2016

Tutorials

DigitalClockCircuitusing8051MicrocontrollerandDS12C887

Electrical

Mini projects

Symbols
Electronics
Microcontroller
ElectronicsHubCoursesSubscribeNowForFree&PaidCoursesDetails
Courses

Embedded

Aurdino

Calculator

Power

Solar

Contact

Robotics

Free circuits

GetFreeCourses

ARM
TUTORIALS

Capcitors
Resitors
Filters
Diodes
Transistors
TUTORIALS

FOLLOW US

Ampli ers

Facebook

IO Devices

Youtube

Thyristors

Google Plus

DC Circuits

Twitter

Nummber System

Return to top of page


Copyright 2016 Electronicshub.org

http://www.electronicshub.org/digitalclockcircuitusing8051andds12c887/

14/14

S-ar putea să vă placă și