A real-time clock, or RTC, is a digital clock with a primary function for keeping an accurate record of time, even when the power supply is turned off or a device is placed in low power mode. RTC are comprised of a controller, an oscillator and an integrated quartz crystal resonator. Real-time clocks (RTC) are timers dedicated to maintaining a one-second time base. In addition, an RTC is often used to keep track of the clock time and the calendar date, either in software or in hardware.
Many of the features of an RTC are highly specialized and necessary to maintain high accuracy and very reliable operation. There are RTC devices external to a microcontroller that interact with an I2C or SPI bus.