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 kbit/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
■ Clock operating voltage: 1.8 V to 5.5 V
■ Low backup current; typical 0.25 µA at VDD= 3.0 V and T
■ 400 kHz two-wire I2C-bus interface (at VDD= 1.8 V to 5.5 V)
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
OSCI1oscillator input
OSCO2oscillator output
INT3interrupt output (open-drain; active LOW)
V
SS
SDA5serial data input and output
SCL6serial clock input
CLKOUT7clock output, open-drain
V
DD
7
6
5
MGR886
V
INT
SS
2
3
4
PCF8563
4ground
8positive supply voltage
CLKOUT
SCL
SDA
8.Functional description
The PCF8563 contains sixteen 8-bit registers with an auto-incrementing address
register, an on-chip 32.768 kHz oscillator with one integrated capacitor, a frequency
divider which provides the source clock for the Real Time Clock/calender (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 years 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, weekdays, months, years as well as the minute
alarm, hour alarm, day alarm and weekday alarm registers are all coded in BCD
format.
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.
By clearing the MSB of one or more of the alarm registers (bit AE = alarm enable),
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). The asserted AF can be used to generateaninterrupt (INT).TheAF
can only be cleared by software.
8.2 Timer
The 8-bit countdown timer at address 0FH is controlled by the timer control register at
address 0EH. The timer control register determines one of 4 source clock
frequencies for the timer (4096 Hz, 64 Hz, 1 Hz, or1⁄60Hz), and enables or 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). The TF may only be
cleared by software.Theasserted 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. Bit TI/TP is used to
control this mode selection. When reading the timer, the current countdown value is
returned.
PCF8563
Real time clock/calendar
8.3 Clock output
A programmable square wave is available at pin CLKOUT. Operation is controlled by
the CLKOUT control register at address 0DH. Frequencies of 32.768 kHz (default),
1024 Hz, 32 Hz 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.
8.4 Reset
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
The PCF8563 has an on-chip voltage-low detector. When VDD drops below V
bit VL in the seconds register is set to indicate that the integrity of the clock
information is no longer guaranteed. The VL flag can only be cleared by software.
Bit VL is intended to detect the situation when VDD is decreasing slowly, for example
under battery operation. Should VDD reach V
bit VL will be set. This will indicate that the time may be corrupted.
Bit positions labelled as x are not implemented. Bit positions labelled with 0 should always be written with logic 0; if read they
could be either logic 0 or logic 1.
AddressRegister nameBCD format tens nibbleBCD format units nibble
Bit 7
3
2
Bit 6
2
2
Bit 5
1
2
Bit 4
0
2
Bit 3
3
2
Bit 2
2
2
Bit 1
1
2
Bit 0
0
2
02HsecondsVL<seconds 00 to 59 coded in BCD>
03Hminutesx<minutes 00 to 59 coded in BCD>
04Hhoursxx<hours 00 to 23 coded in BCD>
05Hdaysxx<days 01 to 31 coded in BCD>
06Hweekdaysxxxxx<weekdays 0 to 6>
07Hmonths/centuryCxx<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 alarmAEx<hour alarm 00 to 23 coded in BCD>
0BHday alarmAEx<day alarm 01 to 31 coded in BCD>
0CHweekday alarmAExxxx<weekday alarm 0 to 6>
1EXT_CLK test mode
60default value is logic 0
5STOP0RTC source clock runs
1all RTC divider chain flip-flops are asynchronously set to logic 0; the RTC clock is
stopped (CLKOUT at 32.768 kHz is still available)
40default value is logic 0
3TESTC0Power-on reset override facility is disabled; set to logic0 for normal operation
1Power-on reset override may be enabled
2 to 00default value is logic 0
8.6.2 Control/status 2 register
Bits TF and AF: When an alarm occurs, AF is set to 1. Similarly, at the end of a timer
countdown, TF is set to 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.
Bits TIE and AIE: These bits activate or deactivate the generation of an interrupt
when TF or AF is asserted, respectively. The interrupt is the logical OR of these two
conditions when both AIE and TIE are set.
4 to 0month01 to 12this register holds the current month coded in BCD format, see Table 16
[1] These bits may be re-assigned by the user.
[1]
0indicates the century is 20xx
1indicates the century is 19xx
Table 16: Month assignments
MonthBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
January Cxx00001
February Cxx00010
MarchCxx00011
AprilCxx00100
MayCxx00101
JuneCxx00110
JulyCxx00111
AugustCxx01000
SeptemberCxx01001
OctoberCxx10000
NovemberCxx10001
DecemberCxx10010
this bit is toggled when the years register overflows from 99 to 00
…continued
Table 17: Years (address 08H) bits description
BitSymbolValueDescription
7 to 0years00 to 99this register holds the current year coded in BCD format
8.6.4 Alarm registers
When one or more of these registers are loaded with a valid minute, hour, day or
weekday and its corresponding bit Alarm Enable (AE) is logic 0, then that information
will be compared with the current minute, hour, day and weekday. When all enabled
comparisons first match, the Alarm Flag (AF) is set. AF will remain set until cleared
by software. Once AF has been cleared it will only be set again when the time
increments to match the alarm condition once more. Alarm registers which have their
bit AE at logic 1 will be ignored.
0 to 6this register holds the weekday alarm information coded in BCD format
8.6.5 Clock output control register
Table 22: CLKOUT control (address 0DH) bits description
BitSymbolValueDescription
7FE0the CLKOUT output is inhibited and CLKOUT output is set to high-impedance
1the CLKOUT output is activated
1 to 0FD1 and
FD0
Table 23: FD1 and FD0: CLKOUT frequency selection
FD1FD0CLKOUT frequency
0032.768 kHz
011024 Hz
1032Hz
111Hz
these bits control the frequency output at pin CLKOUT; see Table 23
8.6.6 Countdown timer
The timer register is an 8-bit binary countdown timer. It is enabled and disabled via
the timer control register bit TE. The source clock for the timer is also selected by the
timer control register. Other timer properties such as interrupt generation are
controlled via control/status 2 register.