Real-time clock (RTC) operation
STFPC320
6.5
Register table for RTC
Table 4. Register table for RTC
Addr D7
D6
D5
D4
D3
D2 D1 D0 Function/range BCD format
00h
Reserved
Reserved
-
-
01h ST
10 seconds
Seconds
Seconds
00-59
02h OFIE
10 minutes
Minutes
Minutes
00-59
03h
0
0
10 hours
Hours (24-hour format)
Hours
00-23
04h RS3 RS2 RS1 RS0
0
Day of week
Day
01-7
05h
1
0
10 date
Date: day of month
Date
01-31
06h CB0 CB1
0
10M
Month
Century/month 0-3/01-12
07h
10 Years
Year
Year
00-99
08h
1
0
S
Calibration
Calibration
09h RB2 BMB4 BMB3 BMB2 BMB1 BMB0 RB1 RB0
Watchdog
0Ah AFE SQWE
1
Al 10M
Alarm month
Al month
01-12
0Bh RPT4 RPT5
Al 10 date
Alarm date
Al date
01-31
0Ch RPT3
0
Al 10 Hour
Alarm Hour
Al hour
00-23
0Dh RPT2
Alarm 10 minutes
Alarm minutes
Al min
00-59
0Eh RPT1
Alarm 10 seconds
Alarm seconds
Al sec
00-59
0Fh WDF AF
0
0
0
Flags
Keys: S = sign bit
ST = stop bit
OFIE = oscillator fail interrupt enable bit
BMB0 – BMB4 = watchdog multiplier bits
CEB = century enable bit
CB = century bit
OUT = output level
SQWE = square wave enable bit
AFE = Alarm flag enable flag
RS0-RS3 = SQW frequency bits
RB0 – RB2 = watchdog resolution bits
RPT1 – RPT5 = alarm repeat mode bits
WDF = watchdog flag (read only)
AF = alarm flag (read only)
OF = Oscillator fail bit
It is recommended to fill the unused bits in the register map to ‘0’ upon a cold boot up.
26/78