The DS1307 is an older but still popular real time clock. This is due to the its simplicity of operation. It can be connected to the microprocessor through the I²C interface with two pull up resistors. Attach a crystal and a battery and it is an accurate, battery-backed real time clock in a system with 56 bytes of Non-Volatile RAM. It will automatically detect when power fails and switch over to battery backup ensuring that time is constantly tracked irrespective of available power. The part can also be run from a battery continuously if that is the application requirement.