
C8051F410/1/2/3
182
Rev. 1.1
SFR Definition 20.3. RTC0DAT: smaRTClock Data
Note: Software should avoid read modify write instructions when writing values to RTC0DAT.
Bits 7–0: RTC0DAT. smaRTClock Data Bits
Holds data transferred to/from the internal smaRTClock register selected by RTC0ADR.
R/W
Reset Value
Variable
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
SFR Address:
0xAD
20.2. smaRTClock Clocking Sources
The smaRTClock peripheral is clocked from its own timebase, independent of SYSCLK. The RTCCLK
timebase is derived from the smaRTClock oscillator circuit. This oscillator has two modes of operation:
Crystal Mode, and Self-Oscillate Mode. The oscillation frequency is 32.768 kHz in Crystal Mode and can
be configured to roughly 20 kHz or 40 kHz in Self-Oscillate Mode. The frequency of the smaRTClock oscil-
lator can be measured with respect to another oscillator using Timer 2 or Timer 3.
SectionNote: The smaRTClock clock can be selected as system clock and routed to a port pin. See
SFR 20.2.1. Using the smaRTClock Oscillator in Crystal Mode
When using Crystal Mode, a 32.768 kHz crystal should be connected between XTAL3 and XTAL4. No
other external components are required. The following steps show how to start the smaRTClock crystal
oscillator in software:
Step 1. Set smaRTClock to Crystal Mode (XMODE = 1).
Step 2. Optional. Enable Automatic Gain Control (AGCEN = 1).
Step 3. Optional. Enable smaRTClock Bias Doubling (BIASX2 = 1).
Step 4. Enable power to the smaRTClock oscillator circuit (RTC0EN = 1).
Step 5. Poll the smaRTClock Clock Valid Bit (CLKVLD) until the crystal oscillator stabilizes.
Step 6. Optional. Clear BIASX2 to ‘0’ after the oscillator stabilizes to conserve power.
20.2.2. Using the smaRTClock Oscillator in Self-Oscillate Mode
When using Self-Oscillate Mode, the XTAL3 and XTAL4 pins should be shorted together. The following
steps show how to configure smaRTClock for use in Self-Oscillate Mode:
Step 1. Set smaRTClock to Self-Oscillate Mode (XMODE = 0).
Step 2. Set the desired oscillation frequency:
For oscillation at about 20 kHz, set BIASX2 = 0.
For oscillation at about 40 kHz, set BIASX2 = 1.
Step 3. The oscillator starts oscillating instantaneously.