
DS87C530/DS83C530 EPROM/ROM Microcontrollers with Real-Time Clock
9 of 46
Table 1. Special Function Register Locations (continued)
* Functions not present in the 80C52 are in bold.
REGISTER
TL2
TH2
PSW
BIT 7
CY
BIT 6
AC
BIT 5
F0
BIT 4
RS1
BIT 3
RS0
BIT 2
OV
BIT 1
FL
BIT 0
P
ADDRESS
CCh
CDh
D0h
WDCON
ACC
SMOD_1
POR
—
EPFI
PFI
WDIF
WTRF
EWT
RWT
D8h
E0h
E8h
EIE
B
—
ERTCI
EWDI
EX5
EX4
EX3
EX2
F0h
F2h
F3h
RTASS
RTAS
0
0
RTAM
RTAH
EIP
0
0
—
0
0
—
F4h
F5h
F8h
0
PRTCI
PWDI
PX5
PX4
PX3
PX2
RTCC
RTCSS
RTCS
SSCE
0
SCE
0
MCE
HCE
RTCRE
RTCWE
RTCIF
RTCE
F9h
FAh
FBh
RTCM
RTCH
RTCD0
0
0
FCh
FDh
FEh
RTCD1
FFh
NONVOLATILE FUNCTIONS
The DS87C530/DS83C530 provide two functions that are permanently powered if a user supplies an
external energy source. These are an on-chip RTC and a nonvolatile SRAM. The chip contains all related
functions and controls. The user must supply a backup source and a 32.768kHz timekeeping crystal.
REAL-TIME CLOCK
The on-chip RTC keeps time of day and calendar functions. Its time base is a 32.768kHz crystal between
pins RTCX1 and RTCX2. The RTC maintains time to 1/256 of a second. It also allows a user to read (and
write) seconds, minutes, hours, day of the week, and date. Figure 2 shows the clock organization.
Timekeeping registers allow easy access to commonly needed time values. For example, software can
simply check the elapsed number of minutes by reading one register. Alternately, it can read the complete
time of day, including subseconds, in only four registers. The calendar stores its data in binary form.
While this requires software translation, it allows complete flexibility as to the exact value. A user can
start the calendar with a variety of selections since it is simply a 16-bit binary number of days. This
number allows a total range of 179 years beginning from 0000.
The RTC features a programmable alarm condition. A user selects the alarm time. When the RTC reaches
the selected value, it sets a flag. This will cause an interrupt if enabled, even in Stop mode. The alarm
consists of a comparator that matches the user value against the RTC actual value. A user can select a
match for 1 or more of the sub-seconds, seconds, minutes, or hours. This allows an interrupt