The purpose of an RTC or a real time clock is to provide precise time and date which can be used for various applications. RTC is an electronic device in the form of an Integrated Chip (IC) available in various packaging options. It is powered by an internal lithium battery. As a result of which even if the power of the system is turned off, the RTC clock keeps running.
While designing any real time system which deals with time, there are two ways of handling the time factor. One is to generate the time internally which is done by programming the timers of the controller; and the other is to use an RTC. The following table shows the comparison of these methods while designing a real time application.
S.No.
|
Parameter
|
Internal Timers
|
RTC
|
1.
|
Error
|
High and keeps increasing with time
|
Almost negligible. Of the order of 1 sec in 100 years
|
2.
|
Memory space usage
|
High
|
Low
|
3.
|
CPU usage
|
High
|
Low
|
4.
|
Ease of Interfacing
|
Easy
|
Difficult
|
5.
|
Program complexity
|
High
|
Low
|
6.
|
Efficiency of system
|
Low
|
High
|
7.
|
Achieving goals of the system
|
Difficult
|
Easy
|
8.
|
Cost
|
Low
|
High
|
DS12C887 is a commonly used RTC by Dallas Semiconductors. It can be easily interfaced with 8051 microcontroller (AT89C51). To explore the basic operation of accessing the internal registers and extracting time from the RTC, refer interfacing RTC DS12C887 with AT89C51.
More RTC DS12C887 based projects: