1.3 RTCC Module Available Clock Sources
The RTCC module offers several different clock source options to the user that can be configured by setting the RTCCLKSEL<1:0> bits of the RTCCON register. The first option available is clocking the RTCC using an external 32.768 kHz crystal tied to the secondary oscillator (SOSC) pin. Using an external crystal oscillator to clock the module offers the advantages of high accuracy, low component cost, and relatively low power consumption along with the VBAT battery backup option. One main disadvantage of using an external crystal oscillator is the discrete component’s performance susceptibility to external variables. When using an external crystal oscillator as the clock source for the RTCC module, it is also important to ensure that any necessary circuitry is added. Refer to the crystal oscillator specifications for more information.
The Medium Frequency Internal Oscillator (MFINTOSC/16) can also be configured to clock the RTCC module at a frequency of 31.25 kHz. Using the internal oscillator eliminates the need for another external component, although one major tradeoff is sacrificing accuracy compared to the 32.768 kHz external crystal.
It is important to note that the VBAT functionality is only available when the RTCC module is running from SOSC. VBAT only provides a backup supply voltage directly to the SOSC and RTCC modules, therefore it can only be implemented when the clock source is the SOSC. In applications where AC power is available, the user can use the Zero-Cross Detect (ZCD) module to create a 50 Hz or 60 Hz signal that can be configured to clock the RTCC module. Each of these clock source selections have a fixed, known prescaler built into the module that is used to generate the required ½ clock signal needed by the RTCC. A block diagram that illustrates the multiplexing of the different available clock signals is available in the Real Time Clock Calendar (RTCC) section of the device data sheet. Table 1-1 summarizes the different clock source settings:
RTCC Clock Source | Ideal Frequency | Fixed Prescaler | RTCCLKSEL<1:0> |
---|---|---|---|
SOSC | 32.768 kHz (Expected) | 1:16384 | 00 |
MFINTOSC / 16 | 31.25 kHz | 1:15625 | 01 |
ZCD Powerline Clock (1) | 50 Hz | 1:25 | 10 |
ZCD Powerline Clock (2) | 60 Hz | 1:30 | 11 |