9 ClOCK TiMeR
9-2
Seiko epson Corporation
S1C63003/004/008/016 TeChniCal Manual
(Rev. 1.1)
interrupt Function
9.4
The clock timer can generate an interrupt at the falling edge of 128 Hz*, 64 Hz*, 32 Hz, 16 Hz*, 8 Hz, 4 Hz*, 2 Hz
and 1 Hz signals. Software can enable or mask any of these frequencies to generate interrupts.
Figure 9.4.1 is the timing chart of the clock timer.
Address
FF41H
FF42H
128 Hz interrupt request
*
64 Hz interrupt request
*
32 Hz interrupt request
16 Hz interrupt request
*
8 Hz interrupt request
4 Hz interrupt request
*
2 Hz interrupt request
1 Hz interrupt request
Bit
D0
D1
D2
D3
D0
D1
D2
D3
Frequency
Clock timer timing chart
128 Hz
64 Hz
32 Hz
16 Hz
8 Hz
4 Hz
2 Hz
1 Hz
4.1 Timing chart of clock timer
Figure 9.
As shown in Figure 9.4.1, an interrupt is generated at the falling edge of each frequency signal (128 Hz*, 64 Hz*, 32
Hz, 16 Hz*, 8 Hz, 4 Hz*, 2 Hz, 1 Hz). At this time, the corresponding interrupt factor flag (IT0*, IT1*, IT2, IT3*,
IT4, IT5*, IT6, IT7) is set to "1." The interrupt mask registers (EIT0*, EIT1*, EIT2, EIT3*, EIT4, EIT5*, EIT6,
EIT7) are used to enable or mask each interrupt factor. However, regardless of the interrupt mask register setting, the
interrupt factor flag is set to "1" at the falling edge of the corresponding signal.
*
Not supported in the S1C63003
i/O Memory of Clock Timer
9.5
Table 9.5.1 shows the I/O addresses and the control bits for the clock timer.
5.1 Control bits of clock timer
Table 9.
Address
Register name R/W Default
Setting/data
Function
FF16H D3 MDCKE (
*
5)
R/W
0
1 Enable
0 Disable
Integer multiplier clock enable
D2 SGCKE
R/W
0
1 Enable
0 Disable
Sound generator clock enable
D1 SWCKE
R/W
0
1 Enable
0 Disable
Stopwatch timer clock enable
D0
RTCKe
R/W
0
1 Enable
0 Disable
Clock timer clock enable
FF40H D3 0 (
*
3)
R
– (
*
2)
–
Unused
D2 0 (
*
3)
R
– (
*
2)
–
Unused
D1
TMRST (
*
3)
W (Reset) 1 Reset
0 Invalid
Clock timer reset (writing)
D0
TMRun
R/W
0
1 Run
0 Stop
Clock timer Run/Stop