Real-Time Clock (Rtc); Overview; Clock Settings; Rtc Counters - Epson S1C17F13 Technical Manual

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

14

Real-Time Clock (RTC)

14.1

Overview

RTC is a real-time clock that counts hours, minutes, and seconds. The main features of RTC are outlined below.
• Contains time counters (seconds, minutes, and hours).
• Either binary or BCD data can be read from and written to the counters.
• Capable of controlling the starting and stopping of the time-of-day clock.
• 24-hour or 12-hour mode is selectable.
• Can generate periodic interrupts (32 Hz, 8 Hz, 4 Hz, 1 Hz, 10 seconds, 1 minute, 10 minutes, 1 hour, half-day,
and 1 day).
Figure 14.1.1 shows the configuration of RTC.
RTC
Reset
Clock generator
F256
and
Theoretical regulation
Interrupt controller
14.2

Clock Settings

RTC uses F256 (256 Hz regulated clock), which is generated by the clock generator from OSC1 as the clock
source, as its operating clock. RTC is operable when OSC1 is enabled.
When using RTC during SLEEP mode, the clock must be configured so that it will keep supplying by writing 0 to
the CLGOSC.OSC1SLPC bit.
14.3

RTC Counters

The RTC contains three counters: second counter, minute counter and hour counter. The count values can be read
out from the respective registers. Each counter can also be set to any desired time by writing data to the register.
Binary mode and BCD mode
The second/minute/hour counters can be configured to binary mode (RTCCTL.BCDMD bit = 0) or BCD mode
(RTCCTL.BCDMD bit = 1).
Second counter
This 7-bit counter counts from 0 to 59 seconds synchronously with the 1 Hz signal derived from the divider.
The counter is cleared to 0 when it reaches 60 seconds and outputs a carry over of 1 to the minute counter. The
counter data can be read/written using the RTCMIN.RTCSEC[6:0] bits.
S1C17F13 TeChniCal Manual
(Rev. 1.0)
RTCST
Count control
RTCRUN
circuit
1 Hz
Divider
32, 8, 4, 1 Hz interrupts
10 s, 1 m interrupts
1DIE
HDIE
Interrupt
1HIE
control
10MIE
circuit
1MIE
10SIE
1HZIE
4HZIE
8HZIE
32HZIE
Figure 14.
1.1 RTC Configuration
Seiko epson Corporation
RTCSEC[6:0]
RTCMIN[6:0]
Second counter
Minute counter
10 m, 1 h interrupts
Half-day, 1 day interrupts
1DIF
HDIF
1HIF
10MIF
1MIF
10SIF
1HZIF
4HZIF
8HZIF
32HZIF
14 REAL-TIME CLOCK (RTC)
RTCHUR[5:0]
AMPM
Hour counter
RTC24H
BCDMD
14-1

Advertisement

Table of Contents
loading

Table of Contents