You are on page 1of 26

A Minor Project Presentation on

REAL TIME CLOCK (RTC)


Session 2010-11 2010-

Guided by:by:Mr. Preet Jain (Asst. Professor EC Department)


Sunday, January 08, 2012 Atush Jain

Presented by:by:Atush Jain (0802ec09me03)


1

What is Real Time Clock?




A real-time clock (RTC) is a computer clock (most realoften in the form of an integrated circuit) that keeps track of the current time. A Real-Time-Clock (RTC) is, as the name suggests, a Real-Timeclock which keeps track of time in a real mode.

Sunday, January 08, 2012

Atush Jain

What is Real Time Clock?


A real time clock is one of the requisite hardware device of an electronic device. RTCs are present in any electronic device which needs to keep accurate time.

Sunday, January 08, 2012

Atush Jain

Function of Real Time Clock (RTC)




RTC keep track of time i.e. it counts seconds, minutes and hours. RTC also has the calendar functionality which keep track of date, month and year. RTC shows the complete time in both the 12/24 hour format with AM/PM Indicator. RTC automatically performs the calculation of leap year and adjust the date of month according to it.

Sunday, January 08, 2012

Atush Jain

Introduction


The Real Time Clock (RTC) module keeps track of current time and has calendar functionality. The RTC comprises of the counter with the following data:data:1) Year from 2000 to 2100 2) Month from 1 to 12 3) Date from 1 to 28, 29, 30 or 31 (as a function of month and year)

Sunday, January 08, 2012

Atush Jain

Introduction
4) Hour from 0 to 23 for 24 hour format, or from 1 to 12 for the 12 hour format. 5) Minute from 0 to 59 6) Second from 0 to 59 with 1Hz clock

Sunday, January 08, 2012

Atush Jain

Description


The RTC communicates with a microprocessor via a simple serial interface and provides seconds, minutes, hours, date, month, and year information. Only three wires are required to communicate with the real time clock (RTC) 1) CE :- Chip Enable :2) I/O :- Input/ Output :3) Sclk :- Serial Clock :Atush Jain 7

Sunday, January 08, 2012

Description

Chip enable signal (CE) must be asserted high during a read or a write operation The input/output (I/O) pin is the bidirectional data pin for the 3wire interface. The serial clock (SCLK) is used to synchronize data movement on the serial interface.
Sunday, January 08, 2012 Atush Jain 8

Block Diagram of RTC




RTC consist of two main blocks ::1) Command & Control Logic Block 2) Real Time Clock

Except these two blocks, RTC also consist of a memory (RAM) and the shift register.

Sunday, January 08, 2012

Atush Jain

Block Diagram of RTC

Sunday, January 08, 2012

Atush Jain

10

Block Diagram of RTC




The Chip Enable (CE) performs two main functions in the RTC ::1) CE turns on the control logic that allows access to the shift register for the address/command sequence. 2) It provides a method of terminating either singlesinglebyte or multiple-byte data transfer. multiple-

Note:Note:- For the above two conditions, CE must be at logic high

Sunday, January 08, 2012

Atush Jain

11

General Frame


To initiate the communication with the RTC, there is a predefined frame format of 8 bits known as the General Frame format. This frame guides the control logic, about which operation is to be performed, hence, also known as Command Byte frame.

Sunday, January 08, 2012

Atush Jain

12

General Frame


The Bit 7 must be at logic High. If it is at logic Low, we are not able to write on the RTC. Bit 6 :- At logic High shows RAM data. :At logic Low shows clock/calendar data. Bits 1 to 5 :- shows the address of designated register to be :input or output. Bit 0 :- At logic Low specifies write operation. :At logic High specifies read operation.

Sunday, January 08, 2012

Atush Jain

13

Modes of RTC


RTC works in two modes ::1) Burst Mode 2) Normal Mode

Burst Mode also known as the multiple byte mode. Normal Mode also known as the single byte mode.

Sunday, January 08, 2012

Atush Jain

14

Burst Mode


Also known as the multiple byte mode as the 31 byte of data is transferred at a time in this mode. This mode is initiated when all the bits of the command byte frame from Bit 1 to Bit 5 are at logic 1 (High).

Sunday, January 08, 2012

Atush Jain

15

Normal Mode


Also known as the single byte mode as the 1 byte of data is transferred at a time in this mode. This mode is initiated except when all the bits of the command byte frame from Bit 1 to Bit 5 are at logic 1 (High).

Sunday, January 08, 2012

Atush Jain

16

Description of Internal Blocks




Input Shift Register


1) It is the very first block of RTC. 2) It is the simple shift register of 8 bits. 3) The output of this shift register feeds to the command & control logic block.

Sunday, January 08, 2012

Atush Jain

17

Command & Control Logic Block




This block controls the functioning of the RTC. The output of shift register works as the input for this block. The input is of 8 bits. These 8 bits come in particular frame format called General Frame.
Atush Jain 18

Sunday, January 08, 2012

Block Diagram of Control Logic

Sunday, January 08, 2012

Atush Jain

19

Read & Write Operation

Sunday, January 08, 2012

Atush Jain

20

Real Time Clock Block

Sunday, January 08, 2012

Atush Jain

21

Output Logic

Sunday, January 08, 2012

Atush Jain

22

Hardware Based & Software Based RTC




Hardware based RTC:- The hardware based RTC RTC:means a dedicated hardware of the Real time clock. Software based RTC:- The software based RTC RTC:means the software of the real time clock is added with the controller, which uses the built-in builtcapabilities of controller.

Sunday, January 08, 2012

Atush Jain

23

Drawback of Software based RTC




The drawback of any software-based RTC is accuracy: This softwaresoftware based RTC is mostly based on the 8051 Timer. The 8051 Timer, in turn, is based on the crystal speed used in our application. Thus, there are two potential issues that we need to take into consideration:consideration:1) Our software will require a known crystal speed. If we change the crystal speed connected to our microcontroller, we will have to modify the software accordingly. 2) The accuracy of our RTC will only be as accurate as the crystal we use.

Sunday, January 08, 2012

Atush Jain

24

Benefits of RTC


Although keeping time can be done without an RTC but using the RTC has benefits:benefits:1) Low power consumption. 2) Free the main system for time-critical tasks. time3) Sometimes more accurate than other methods.

Sunday, January 08, 2012

Atush Jain

25

Thank You

You might also like