R01UH0092EJ0110 Rev.1.10
Page 368 of 807
Jul 31, 2012
M16C/64C Group
20. Real-Time Clock
20. Real-Time Clock
20.1
Introduction
The real-time clock generates a 1-second signal from a count source and counts seconds, minutes,
hours, a.m./p.m., a day, and a week. It also detects matches with specified seconds, minutes, and hours.
Table 20.1 lists Real-Time Clock Specifications, Figure 20.1 shows a Real-Time Clock Block Diagram,
and Table 20.2 lists the I/O Port.
Table 20.1
Real-Time Clock Specifications
Item
Specification
Count source
f1, fC
Count operation
•
Increment
•
Compare mode 1 or not using compare mode
The count value is continuously used, and the count continues.
•
Compare mode 2
When a compare match is detected, the count value is set to 0
and the count continues.
•
Compare mode 3
When a compare match is detected, the count value is set to 0
and the count stops.
Count start condition
1 (count started) is written to the TSTART bit in the RTCCR1
register.
Count stop condition
0 (count stopped) is written to the TSTART bit in the RTCCR1
register.
Interrupt request generation timing
Select one of the following:
•
Update second data
•
Update minute data
•
Update hour data
•
Update day data
•
When day data is set to 000b
•
When time data and compare data match
RTCOUT pin function
Programmable I/O port or compare output
Read from timer
When the RTCSEC, RTCMIN, RTCHR, or RTCWK register is read,
the count value can be read. The values read from registers
RTCSEC, RTCMIN, and RTCHR are represented by the BCD code.
Write to timer
When bits TSTART and TCSTF in the RTCCR1 register are 0 (count
stopped), the RTCSEC, RTCMIN, RTCHR, and RTCWK registers
are write enabled. Values written to registers RTCSEC, RTCMIN,
and RTCHR are represented by the BCD code.
Selectable functions
•
12-/24-hour mode switch function
•
Compare output
Note:
1.
In this manual, day refers to one day of the week. Refer to 20.2.4 “Real-Time Clock Day Data
Register (RTCWK)” for details.
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...