Professional Documents
Culture Documents
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.
Atush Jain
Atush Jain
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.
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)
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
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
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
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.
Atush Jain
Atush Jain
10
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-
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.
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.
Atush Jain
13
Modes of RTC
Burst Mode also known as the multiple byte mode. Normal Mode also known as the single byte mode.
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).
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).
Atush Jain
16
Atush Jain
17
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
Atush Jain
19
Atush Jain
20
Atush Jain
21
Output Logic
Atush Jain
22
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.
Atush Jain
23
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.
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.
Atush Jain
25
Thank You