
A battery-powered integrated circuit (IC) or internal module within a computer or electronic device that tracks the current time and date, even when the main power is turned off.
Core Components
- Oscillator: A crystal (usually a quartz crystal vibrating at 32.768 kHz) that provides a precise, stable frequency for timekeeping.
- Counter/Registers: Digital storage that tallies the oscillator’s pulses to calculate seconds, minutes, hours, days, and years.
- Backup Power Source: Typically a small lithium coin cell (e.g., CR2032) or a supercapacitor that maintains the clock’s state during power outages.
Key Terminology
- Drift: The slight deviation in time accuracy over a long period, usually measured in parts per million (ppm). Environmental factors like temperature can cause an RTC to gain or lose seconds.
- I2C / SPI: The common communication protocols used by an RTC to send time data to a device’s central processor.
- Epoch: The starting point in time from which an RTC calculates its values (e.g., January 1, 1970, for Unix-based systems).
- Non-Volatile RAM (NVRAM): A small amount of memory often included on RTC chips to store critical system settings (like BIOS configurations) that must survive a reboot.
RTC vs. System Clock
| Feature | Real-Time Clock (RTC) | System Clock (Software) |
| Persistence | Continues running when powered off. | Resets or clears when power is lost. |
| Accuracy | High (hardware-driven). | Variable (software-driven). |
| Power Source | Dedicated battery. | Main system power. |
| Primary Use | Long-term time tracking. | Task scheduling and timestamps. |
Common Use Cases
- PCs & Servers: Maintaining the BIOS/UEFI time and hardware boot parameters.
- Embedded Systems: Triggering events in data loggers or IoT devices at specific intervals.
- Digital Cameras: Timestamping photos and videos with the correct date metadata.
- Appliances: Powering the clock on your microwave or oven during a power flicker.
Technical Note: Modern devices often sync their 1.