A real-time clock (RTC) is a circuit that keeps track of time by counting the precise oscillations of a crystal oscillator of known frequency. For example, a typical frequency of a quartz crystal oscillator used in RTC applications is 32.768 kHz. That frequency is not arbitrary but is exactly 215 cycles per second. That means we can use a 15-bit (16-bit in practical) counter to count the oscillations and produce a digital signal every second. A set of such digital counters can be cascaded and be used to count minutes, hours, days and so on. Quartz crystal oscillators (a piezo-electric material) produce very precise oscillations and therefore used in almost all the consumer applications including wrist watches, smartphones, TVs etc. You can learn more about how quartz crystals work and how they’re manufactured for time-keeping applications in this video by Steve Mould.
To make the application easier, semiconductor companies produce standalone integrated circuits that implement all the required circuitry for an RTC in a single IC package. These are called RTC ICs. A popular such RTC IC is the DS1307 from Maxim semiconductor. But there are better RTCs available from both Maxim and other manufactures. In this project, I will show you how does a generic RTC IC work and how to interface the ISL1208 RTC IC from Intersil (a subsidiary of Renesas Electronics) with a microcontroller.