The PCF8563 is a CMOS real-time clock/calendar optimized for low power
consumption. A programmableclockoutput,interruptoutputandvoltage-low detector
are also provided. All address and data are transferred serially via a two-line
bidirectional I2C-bus. Maximum bus speed is 400 kbits/s. The built-in word address
register is incremented automatically after each written or read data byte.
2.Features
■ Provides year, month, day, weekday, hours, minutes and seconds based on
32.768 kHz quartz crystal
■ Century flag
■ Wide operating supply voltage range: 1.0 to 5.5 V
■ Low back-up current; typical 0.25 µA at VDD= 3.0 V and T
PCF8563PDIP8plastic dual in-line package; 8 leads (300 mil)SOT97-1
PCF8563TSO8plastic small outline package; 8 leads; body width 3.9 mmSOT96-1
PCF8563TSTSSOP8plastic thin shrink small outline package; 8 leads; body width 3.0 mmSOT505-1
6.Block diagram
DIVIDER
LOGIC
CLKOUT
7
CONTROL/STATUS 1
1 Hz
CONTROL/STATUS 2
SECONDS/VL
MINUTES
HOURS
DAYS
WEEKDAYS
MONTHS/CENTURY
YEARS
MINUTE ALARM
HOUR ALARM
DAY ALARM
WEEKDAY ALARM
CLKOUT CONTROL
TIMER CONTROL
TIMER
The PCF8563 contains sixteen 8-bit registers with an auto-incrementing address
register, an on-chip 32.768 kHz oscillator with an integrated capacitor, a frequency
divider which provides the source clock for the Real-Time Clock (RTC), a
programmable clock output, a timer, an alarm, a voltage-low detector and a 400 kHz
I2C-bus interface.
All 16 registers are designed as addressable 8-bit parallel registers although not all
bits are implemented. The first two registers (memory address 00H and 01H) are
used as control and/or status registers. The memory addresses 02H through 08H are
used as counters for the clock function (seconds up to year counters). Address
locations 09H through 0CH contain alarm registers which define the conditions for an
alarm. Address 0DH controls the CLKOUT output frequency. 0EH and 0FH are the
timer control and timer registers, respectively.
The Seconds, Minutes, Hours, Days, Months, Years as well as the Minute alarm,
Hour alarm and Day alarm registers are all coded in BCD format. The Weekdays and
Weekday alarm register are not coded in BCD format.
PCF8563
Real-time clock/calendar
When one of the RTC registers is read the contents of all counters are frozen.
Therefore, faulty reading of the clock/calendar during a carry condition is prevented.
8.1 Alarm function modes
By clearing the MSB (bit AE = Alarm Enable) of one or more of the alarm registers,
the corresponding alarm condition(s) will be active. In this way an alarm can be
generated from once per minute up to once per week. The alarm condition sets the
alarm flag, AF (bit 3 of Control/Status 2 register). The asserted AF can be used to
generate an interrupt (INT). Bit AF can only be cleared by software.
8.2 Timer
The 8-bit countdown timer (address 0FH) is controlled by the Timer Control register
(address 0EH; see Table 25). The Timer Control register selects one of 4 source
clock frequencies for the timer (4096, 64, 1, or1⁄60Hz), and enables/disables the
timer. The timer counts down from a software-loaded 8-bit binary value. At the end of
every countdown, the timer sets the timer flag TF (see Table 7). The timer flag TF can
only be cleared by software. The asserted timer flag TF can be used to generate an
interrupt (INT). The interrupt may be generated as a pulsed signal every countdown
period or as a permanently active signal which follows the condition of TF. TI/TP (see
Table 7) is used to control this mode selection. When reading the timer, the current
countdown value is returned.
8.3 CLKOUT output
A programmable square wave is availableat the CLKOUT pin. Operation is controlled
by the CLKOUT frequency register (address 0DH; see Table 23). Frequencies of
32.768 kHz (default), 1024, 32 and 1 Hz can be generated for use as a system clock,
microcontroller clock, input to a charge pump, or for calibration of the oscillator.
CLKOUT is an open-drain output and enabled at power-on. If disabled it becomes
high-impedance.
The PCF8563 includes an internal reset circuit which is active whenever the oscillator
is stopped. In the reset state the I2C-bus logic is initialized and all registers, including
the address pointer, are cleared with the exception of bits FE, VL, TD1, TD0, TESTC
and AE which are set to logic 1.
8.5 Voltage-low detector and clock monitor
PCF8563
Real-time clock/calendar
The PCF8563 has an on-chip voltage-low detector. When VDD drops below V
VL bit (Voltage Low, bit 7 in the Seconds register) is set to indicate that reliable
clock/calendar information is no longer guaranteed. The VL flag can only be cleared
by software.
The VL bit is intended to detect the situation when VDD is decreasing slowly for
example under battery operation. Should VDDreach V
before power is re-asserted
low
then the VL bit will be set. This will indicate that the time may be corrupted.
handbook, halfpage
V
DD
V
low
Fig 4. Voltage-low detection.
period of battery
operation
VL set
MGR887
normal power
operation
t
8.6 Register organization
low
the
Table 4:Registers overview
Bit positions labelled as ‘−’are not implemented; those labelled with ‘0’ should always be written with logic 0.
Address Register name BCD format tens nibbleBCD format units nibble
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
3
2
02HSecondsVL<seconds 00 to 59 coded in BCD>
03HMinutes−<minutes 00 to 59 coded in BCD>
04HHours−−<hours 00 to 23 coded in BCD>
05HDays−−<days 01 to 31 coded in BCD>
06HWeekdays−−−−−<weekdays 0 to 6 >
07HMonths/CenturyC−−<months 01 to 12 coded in BCD>
08HYears<years 00 to 99 coded in BCD>
09HMinute alarmAE<minute alarm 00 to 59 coded in BCD>
0AHHour alarmAE−<hour alarm 00 to 23 coded in BCD>
0BHDay alarmAE−<day alarm 01 to 31 coded in BCD>
0CHWeekday alarmAE−−−− <weekday alarm 0 to 6 >
Table 7:Description of Control/Status 2 register bits description (address 01H)
BitSymbol Description
7 to 50By default set to logic 0.
4TI/TPTI/TP = 0: INT is active when TF is active (subject to the status of TIE).
3AFWhen an alarm occurs, AF is set to logic 1. Similarly, at the end of a
2TF
1AIEBits AIE and TIE activate or deactivate the generation of an interrupt
0TIE
PCF8563
Real-time clock/calendar
TI/TP = 1: INT pulses active according to Table 8 (subjectto the status
of TIE). Note that if AF and AIE are active then INT will be permanently
active.
timer countdown, TF is set to logic 1. These bits maintain their value
until overwritten by software. If both timer and alarm interrupts are
required in the application, the source of the interrupt can be
determined by reading these bits. To prevent one flag being
overwritten while clearing another, a logic AND is performed during a
write access. See Table 9 for the value descriptions of bits AF and TF.
when AF or TF is asserted, respectively.The interrupt is the logical OR
of these two conditions when both AIE and TIE are set.