Real time clock -rtc, Computer Graphics

Main objectives:

  1. To test to micro-controller I2C protocol bus functionality
  2. Setting and displaying accurate time and date on the LCD


The DS1307 serial real-time clock (RTC) is a low power, full binary-coded decimal (BCD) clock/calendar that has 56 bytes of NV SRAM. The I2C, bidirectional bus is used serially to transfer the address and data.

The clock/calendar provides information of seconds, minutes, hours, day, date, month, and year. The end of the month date is automatically adjusted for months with fewer than 31 days, which includes corrections for leap year. The clock can operate in either 12-hour displaying AM/PM or in 24-hour mode.

The DS1307 has a built-in power-sense circuit that detects power failures and automatically switches to the backup supply. The timekeeping operation continues while the part operates from the backup supply.
REAL-TIME CLOCK, RTC is a battery-powered clock that is an IC located on the computer motherboard or embedded systems that allows the computer to keep time. The RTC keeps track of accurate time and calendar i.e. the second, minute, hour, day, month and year. RTCs are present in almost any electronic device which needs to keep accurate time.
The DS1307 (RTC) Real Time Clock IC (an I2C real time clock) is an 8-pins device using an I2C interface. It has 8 read/write registers that store the following information in table below.

TABLE : Real Time Clock IC DS1307 Pins functions


Register function


Seconds 0-59


Minutes 0-59


Hours 0-24,1-12


Day 1-7


Date 1-31


Month 1-12


Year 0-99



Note: In the same way as the I2C pins you need to add a pull-up to V+ at the SQW/OUT pin to see any output signal, as it is an open drain output.


The Clock Halt Bit (CH) which is bit 7 of address 0 is the most important factor. This is the register that controls 'seconds' and the CH bit has to be preserved otherwise the chip stops the clock. Writing zero to this bit resets the CH bit so that the clock runs. You have to reset the CH bit to zero to let the chip operate!


Using the DS1307 allow you to put the crystal in the least noisy part of the interface board and also sets the crystal load capacitance which is critical in making the crystal oscillate at exactly 32 kHz - controlling its initial error i.e. for the specified ppm error value, the load capacitance must be accurate.

Note: A common way of calibrating a crystal is the crystal pulling or changing the capacitance at one crystal pin relative to the other. Hence the load capacitance is crucial.


The DS1307 detects a power failure if its input voltage (VCC) falls below (VBat) and automatically switches to the VBat supply input (a lithium 3V battery can be used as the backup battery). It also inhibits I2C control signals until VCC is 1.25 x VBat in order not to put bad data into the chip as the power fails.

Posted Date: 2/23/2013 1:00:23 AM | Location : United States

Related Discussions:- Real time clock -rtc, Assignment Help, Ask Question on Real time clock -rtc, Get Answer, Expert's Help, Real time clock -rtc Discussions

Write discussion on Real time clock -rtc
Your posts are moderated
Related Questions
Translate a triangle and scale it in each coordinate direction Consider a triangle with vertices in 2D plane given by (0, 0), (1, 0) and (0,1) (called unit triangle).  Translat

Uses for GIF and JPEG Files: Microsoft Internet Explorer, Netscape Navigator and most the other browsers maintain both JPEG and GIF graphics. Theoretically, you could util

Define the working procedure of CRT with diagram

Overview of Hardware Primitives With the advancement of computer technology, computer graphics has become a practical tool used in real life applications in diverse areas such

Relation between 2-D Euclidean system and Homogeneous coordinate system Suppose that P(x,y) be any point in 2-D Euclidean system. In HCS, we add a third coordinate to the poin

What are the uses of homogeneous coordinates? Convert translation rotation and scaling in homogeneous coordinates. In mathematics homogeneous coordinates introduced by August

Visible Surface Detection - Modeling and Rendering Provided a set of 3-Dimentional objects and a viewing position for the generation of realistic graphics show, we want to de

Question: (a) There are 3 main industries of drawing style and it has become a phenomenon. It was inspired by internationally diffused cartoons, comic strip books and since the

Presentation Graphics The instant you are going to represent yourself or your product or company or research paper and so on. Only standing and speaking is fairly ineffective.

explain vecgen line drawing algorithm