
STK17CA8
June 2003
13
Document Control # ML0023 rev 0.2
nvTIME OPERATION
The STK17CA8 offers internal registers that contain
Clock, Alarm, Watchdog, Interrupt, and Control func-
tions. Internal double buffering of the clock and the
clock/timer information registers prevents accessing
transitional internal clock data during a read or write
operation. Double buffering also circumvents dis-
rupting normal timing counts or clock accuracy of
the internal clock while accessing clock data. Clock
and Alarm Registers store data in BCD format.
CLOCK OPERATIONS
The clock registers maintain time up to 9,999 years
in one second increments. The user can set the time
to any calendar time and the clock automatically
keeps track of days of the week and month, leap
years and century transitions. There are eight regis-
ters dedicated to the clock functions which are used
to set time with a write cycle and to read time during
a read cycle. These registers contain the Time of
Day in BCD format. Bits defined as “X” are currently
not used and are reserved for future use by Simtek.
READING THE CLOCK
While the double-buffered RTC register structure
reduces the chance of reading incorrect data from the
clock, the user should halt internal updates to the
STK17CA8 clock registers before reading clock data
to prevent the reading of data in transition. Stopping
the internal register updates does not affect clock
accuracy.
The updating process is stopped by writing a “1” to
the read bit (in the control register 1FFF0h), and will
not restart until a “0” is written to the read bit. The
RTC
registers can then be read while the internal
clock continues to run.
Within 10 msec after a “0” is written to the read bit,
all STK17CA8 registers are simultaneously updated.
SETTING THE CLOCK
Setting the write bit (in the control register 1FFF0h)
to a “1” halts updates to the STK17CA8 registers.
The correct day, date and time can then be written
into the registers in 24-hour BCD format. Resetting
the write bit to “0” transfers those values to the
actual clock counters, after which the clock resumes
normal operation.
BACKUP POWER
The STK17CA8 is intended for permanently pow-
ered operation, but when primary power, Vcc, fails
and drops below Vswitch the device will switch to
backup power from either Vbakcap or Vbakbat,
depending on whether a capacitor or battery is cho-
sen for the application.
The clock oscillator uses very little current, which
maximizes the backup time available from the
backup source. Regardless of clock operation with
the primary source removed, the data stored in
vSRAM is secure, having been stored in the nonvol-
atile elements as power was lost. Factors to be con-
sidered when choosing a backup power source
include: the expected duration of power outages and
the cost tradeoff of using a battery versus a capaci-
tor.
During backup operation the STK17CA8 consumes
a maximum of 300 nanoamps at 2 volts. Capacitor
or battery values should be chosen according to the
application. Backup time values based on maximum
current specs are shown below. Nominal times are
approximately 3 times longer.
Using a capacitor has the obvious advantage of
recharging the backup source each time the system
is powered up.
If a battery is used a 3V lithium is recommended and
the STK17CA8 will only source current from the bat-
tery when the primary power is removed. The bat-
tery will not, however, be recharged at any time by
the STK17CA8. The battery capacity should be cho-
sen for total anticipated cumulative down-time
required over the life of the system.
STOPPING AND STARTING THE OSCIL-
LATOR
The oscillator may be stopped at any time. This fea-
ture may be used to save battery or capacitor
energy during long-term storage to increase shelf
life. Setting the OSCEN bit in register 1FFF8h to 1
halts the oscillator. Setting the bit to 0 enables the
oscillator. The RTC does not run until the oscillator
Capacitor Value
Backup Time
0.1 F
72 hours
0.47 F
14 days
1.0 F
30 days