An RTCC uses 32.768 kHz oscillations to provide a clock to the internal counters as shown in the figure on the right. A 15-bit counter overflows every 32,768 clocks (which is every second), providing a consistent time base. The counter feeds additional counters, which count the seconds, tens of seconds, minutes and so on, up to tens of years. If available, alarms compare the current values of the time counters to the alarm registers. If there is a match, the RTCC will modify a flag bit in an internal register or change the state of an output pin.
As noted above, an RTCC works with an oscillator, which is typically a quartz crystal that is shaped to vibrate at a specific frequency. Most RTCC devices use a 32.768 kHz quartz crystal, which is often referred to as a watch crystal. They also typically use an internal inverting amplifier circuit, as shown in the figure on the right, to resonate the crystal. The amplifier is configured with two feedback paths between its output and input that cause it to resonate or oscillate.
The oscillator circuit is not resonating before the RTCC's amplifier is enabled. When the amplifier is enabled, any thermal or background noise picked up by the oscillator circuit is amplified and causes the system to begin to oscillate. The oscillations quickly grow in amplitude.
The internal resistor (Rf) provides a non-frequency-specific feedback path around the amplifier. This assists in starting oscillations, but it has relatively high impedance. The crystal has much lower impedance at the rated frequency and rapidly dominates over the internal resistor to set the frequency of the oscillations. Capacitors (C1 and C2) ensure stable oscillation. Their values are determined by the crystal used and any other capacitance in the oscillator circuit.
Crystals only resonate at their rated frequency at a specified temperature. This is typically 25°C for 32.768 kHz tuning-fork watch crystals. The crystal will resonate at lower frequencies at other temperatures. This is a highly predictable property of the thermal expansion of quartz. While minor changes in temperature may not be an issue, as temperatures move further away from 25°C, the variance in frequency may cause the RTCC to lose significant amounts of time. Therefore, many RTCC devices offer a digital trimming or analog compensation scheme that can adjust for the frequency error to ensure accurate timekeeping.
Live Chat