SM59R16A5/SM59R09A5/SM59R05A5
8-Bit Micro-controller
64KB/36KB/20KB with ISP Flash
& 2KB RAM embedded
20. RTC(Real Time Clock) function
The RTC interrupt vector is 8BH.
The RTC SFR show as below:
Mnemonic
Description
Direct
Bit 7
Bit 6
Bit 5
RTC
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RESET
RTCADDR
RTCDATA
RTC Address
RTC Data
9Eh
9Fh
-
-
-
-
RTCADDR[3:0]
00H
00H
RTCDATA[7:0]
Mnemonic
Description
Address
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
RESET
RTC function
RTC Control
register
RTC SECOND
register
RTC MINUTE
register
RTC HOUR
register
RTC DAY
register
RTC WEEK
register
RTC MONTH
register
RTC YEAR
register
PeriodI
F
PeriodIntE
n
ALARMInten
RTCCTRL
SEC
00h
01h
02h
03h
04h
05h
06h
07h
08h
RTCen
ALARMIF
INT_SEL[2:0]
SEC[3:0]
MIN[3:0]
00h
00h
00h
00h
01h
06h
01h
00h
00h
-
-
-
-
-
-
SEC[6:4]
MIN[6:4]
MIN
HOUR
DAY
-
-
-
-
HOUR[5:4]
DAY[5:4]
HOUR[3:0]
DAY[3:0]
WEEK
MONTH
YEAR
ALMMIN
-
-
-
-
WEEK[2:0]
MONTH[4]
MONTH[3:0]
YEAR[3:0]
YEAR[7:4]
RTC minute
alarm
RTC hour alarm
RTC day alarm
RTC week
alarm
MINen
ALMMIN[6:4]
ALMHOUR[5:4]
ALMDAY[5:4]
ALMMIN[3:0]
ALMHOUR
ALMDAY
09h
10h
HOURen
DAYen
-
-
ALMHOUR[3:0]
ALMDAY[3:0]
00h
00h
ALMWEEK
11h
12h
WEEKen
-
-
-
-
-
-
ALMWEEK[2:0]
ALMMONTH[3:0]
00h
00h
ALMMONT
H
RTC month
alarm
MONTHen
ALMMONTH[4]
Mnemonic: RTCCTRL
Address: 00H
7
6
5
4
3
2
1
0
Reset
00h
RTCen
PeriodIF
ALARMInten
ALARMIF
PeriodIntEn
INT_SEL[2:0]
RTCen: RTC Circuit enable
0: disable
1: enable
PeriodIF: Periodical interrupt flag
1: RTC Int caused by periodical Int. Must clear by software write “0”.
ALARMInten: ALARM Interrupt Enable
ALARM interrupt will be generated when ALARM data match RTC data.
0: ALARM Interrupt disable
1: ALARM Interrupt enable
ALARMIF: ALARM interrupt flag
1: RTC Int caused by Alarm Int.
Must clear by software write “0”.
PeriodIntEn: Periodical Interrupt enable
INT_SEL[2:0]: RTC interrupt will be generated periodically according INT_SEL[2:0]
000: interrupt is set as 0.5 second
001: interrupt is set as 1 second
010: interrupt is set as 0.5 minute
011: interrupt is set as 1 minute
100: interrupt is set as 0.5 hour
Specifications subject to change without notice contact your sales representatives for the most recent information.
ISSFD-M047 79 Ver.G SM59R16A5 01/2014