In this Micro Controller Based Digital Code Lock ECE Mini Project ,a Real Time Clock is used, which incorporates a 2-wire serial interface I2C protocol, which can be controlled using an 8051-compatible microcontroller.A real-time clock (RTC) is a battery-powered clock that is included in a microchip having a numerous capabilities.

Clock calander shows detailed information based on time, day, month , year . After completion of every month day and month are automatically adjusted with fewer than 31 days, which includes correction of leap year. This clock works in both 24 and 12 hrs format with am/pm indicator.

An RTC can be used in many applications: To perform some scheduled task periodically, Industrial automated Process, Process Control with respect to time and many more small applications.

There are numbers of RTC chips availiable in the markets by different manufactures among them the most common is I²C based DS1307 RTC which can be interface with Microcontrollers via two serial communication lines (i.e SCL, SDA). An I²C (Inter-Integrated -Circuit) is multi-master serial communication protocol invented first by Philips that is used to attach pheripherals to Microcontroller or either low speed pheripherals to a computer motherboard ,embedded system or cell phones. 

This Project is to interface a Real Time Clock to a microcontroller and display Time, Day, Date, Month, Year in LCD and continously update the changed data in LCD. For this, the process starts with writing the RTC with initial settings through the SDA and SCL lines of I²C Module from microcontroller and reading the updated data from RTC chip and continously update the same in LCD. Time in the fomat hh:mm:ss and date in the format dd/mm/yy is displayed on the LCD.