Real-Time Clock (RTC)

An RTC maintains time and, where provided, calendar registers for another circuit to read. Backup operation, alarms, interface availability and crystal arrangements depend on the device. The DS3231 is one example with an integrated crystal, temperature compensation, I²C and automatic backup-supply switching.

An oscillator provides a reference that the timekeeping circuit divides and counts. The DS3231 uses a nominal 32.768 kHz reference, reads temperature and adjusts a capacitor array to compensate crystal-frequency drift. Its specified frequency stability is ±2 ppm from 0°C to +40°C and ±3.5 ppm over the wider specified industrial temperature range, under the datasheet conditions. This is not a promise that every RTC or every complete system holds the same accuracy.

In plain terms

A small clock beside the main computer. It can keep counting while the computer sleeps, provided the clock still has the power and oscillator conditions it needs.

Also called: real time clock, DS3231, DS1307, PCF8523.

Why designers use it

Best for

Key specifications

When not to use it

Common mistakes

Where you will find it

A short history

RTC designs combine an oscillator, counters, calendar logic and, in suitable devices, backup-power management. The DS3231 integrates a temperature-compensated crystal oscillator and an aging-trim register. It illustrates one approach to improving a local clock's stability without implying that all RTC families use the same compensation mechanism.

Good to know

Related