DS87C530/DS83C530 EPROM/ROM Microcontrollers with Real-Time Clock

Table 1. Special Function Register Locations (continued)

* Functions not present in the 80C52 are in bold.

REGISTER

BIT 7

BIT 6

BIT 5

BIT 4

BIT 3

BIT 2

BIT 1

BIT 0

ADDRESS

 

 

 

 

 

 

 

 

 

 

TL2

 

 

 

 

 

 

 

 

CCh

 

 

 

 

 

 

 

 

 

 

TH2

 

 

 

 

 

 

 

 

CDh

 

 

 

 

 

 

 

 

 

 

PSW

CY

AC

F0

RS1

RS0

OV

FL

P

D0h

 

 

 

 

 

 

 

 

 

 

WDCON

SMOD_1

POR

EPFI

PFI

WDIF

WTRF

EWT

RWT

D8h

 

 

 

 

 

 

 

 

 

 

ACC

 

 

 

 

 

 

 

 

E0h

 

 

 

 

 

 

 

 

 

 

EIE

ERTCI

EWDI

EX5

EX4

EX3

EX2

E8h

 

 

 

 

 

 

 

 

 

 

B

 

 

 

 

 

 

 

 

F0h

 

 

 

 

 

 

 

 

 

 

RTASS

 

 

 

 

 

 

 

 

F2h

 

 

 

 

 

 

 

 

 

 

RTAS

0

0

 

 

 

 

 

 

F3h

 

 

 

 

 

 

 

 

 

 

RTAM

0

0

 

 

 

 

 

 

F4h

 

 

 

 

 

 

 

 

 

 

RTAH

0

0

0

 

 

 

 

 

F5h

 

 

 

 

 

 

 

 

 

 

EIP

PRTCI

PWDI

PX5

PX4

PX3

PX2

F8h

 

 

 

 

 

 

 

 

 

 

RTCC

SSCE

SCE

MCE

HCE

RTCRE

RTCWE

RTCIF

RTCE

F9h

 

 

 

 

 

 

 

 

 

 

RTCSS

 

 

 

 

 

 

 

 

FAh

 

 

 

 

 

 

 

 

 

 

RTCS

0

0

 

 

 

 

 

 

FBh

 

 

 

 

 

 

 

 

 

 

RTCM

0

0

 

 

 

 

 

 

FCh

 

 

 

 

 

 

 

 

 

 

RTCH

 

 

 

 

 

 

 

 

FDh

 

 

 

 

 

 

 

 

 

 

RTCD0

 

 

 

 

 

 

 

 

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

10 of 47