beautypg.com

Real-time clock, Ation on this interrupt can be found in section – Maxim Integrated High-Speed Microcontroller User Manual

Page 156

background image

High-Speed Microcontroller User’s Guide

Rev: 062210

156 of 176

14. REAL-TIME CLOCK

The DS87C530 incorporates a real-time clock (RTC) onto the high-speed microcontroller family core.
This allows the device to perform real-time related functions such as data logging and timestamping
without an external timer. In addition, the RTC includes an alarm function that can execute a software
interrupt or resume operation from Stop mode at a specified time. The RTC features are controlled by 12
new SFRs. These registers as well as two new interrupt control bits are shown in

Table 14-A

.

Table 14-A. Real-Time Clock Control and Status Bit Summary

NAME

LOCATION

FUNCTION

RANGE

RESET

READ/WRITE ACCESS

ERTCI

EIE

.5 RTC

Interrupt

Enable

0

Unrestricted

PRTCI

EIP

.5 RTC

Interrupt

Priority

0

Unrestricted

RTASS.7–0

RTASS

RTC Alarm Subsecond

0–FFh

Unchanged

Unrestricted

RTAS.5–0

RTAS

RTC Alarm Second

0–3Bh

Unchanged

Unrestricted

RTAM.5–0

RTAM

RTC Alarm Minute

0–3Bh

Unchanged

Unrestricted

RTAH.4–0

RTAH

RTC Alarm Hour

0–17H

Unchanged

Unrestricted

RTCSS.7–0

RTCSS

RTC Subsecond

0–FFh

Unchanged

Read: only if RTCRE = 1.
Cannot be written. Cleared when
RTCWE 1 ≥ 0.

RTCS.5–0

RTCS

RTC Second

0–3Bh

Unchanged

RTCM.5–0

RTCM

RTC Minute

0–3Bh

Unchanged

RTCH.4–0

RTCH

.4–0 RTC

Hour

0–17h

Unchanged

DOW.2–0

RTCH

.7–5

RTC Day of Week

0–7h

Unchanged

RTCD1.7–0
RTCD0.7–0

RTCD1

, (MSB)

RTCD0

, (LSB)

RTC Day

0–FFFFh

Unchanged

Read: only if RTCRE = 1.
Write: only if RTCWE = 1.
1.95ms Read/Write window

SRCE

RTCC

.7

RTC Subsecond
Compare Enable

Unchanged

Unrestricted

SCE

RTCC

.6

RTC Second Compare
Enable

Unchanged

Unrestricted

MCE

RTCC

.5

RTC Minute Compare
Enable

Unchanged

Unrestricted

HCE

RTCC

.4

RTC Hour Compare
Enable

Unchanged

Unrestricted

RTCRE

RTCC

.3

RTC Read Enable

0

Unrestricted

RTCWE

RTCC

.2 RTC

Write

Enable

0

Read: Unrestricted
Write: Timed Access

RTCIF

RTCC

.1 RTC

Interrupt

Flag

Unchanged

Unrestricted

RTCE

RTCC

.0 RTC

Enable

Unchanged

E4K

TRIM

.7

External 4096Hz RTC
Signal Enable

0

X12/6

TRIM

.6

RTC Crystal
Capacitance Select

Unchanged

Read: Unrestricted
Write: Timed Access

TRM2–0

TRIM

.5

TRIM

.3

TRIM

.1

RTC Trim Bit 2–0

Unchanged

Read: Unrestricted
Write: Timed Access


The RTC control and status registers can be subdivided into four groups: RTC time registers
(

RTCSS

;FAh,

RTCS

;FBh,

RTCM

;FCh,

RTCH

;FDh,

RTCD0

;FEh,

RTCD1

;FFh), RTC alarm registers

(

RTASS

;F2h,

RTAS

;F3h,

RTAM

;F4h,

RTAH

;F5h), RTC calibration (

TRIM

;96h), and RTC control

(

RTCC

;F9h).