13 CLOCK TIMER (CT)
13-2
Seiko epson Corporation
S1C17F13 TeChniCal Manual
(Rev. 1.0)
0x57
0x58 0x59 0x5a 0x5b
0x5c
CTCTL.MODEN (WR)
CTDAT register
CTCTL.MODEN (RD)
Count clock (256 Hz)
3.1 Run/Stop Control Timing Chart
Figure 13.
Counter read
1. Read the count value from the CTDAT.CTCNT[7:0] bits.
2. Read again.
i. If the two read values are the same, assume that the count values are read correctly.
ii. If different values are read, perform reading once more and compare the read value with the previous one.
Interrupts
13.4
CT has a function to generate the interrupts shown in Table 13.4.1.
4.1 CT Interrupt Function
Table 13.
Interrupt
Interrupt flag
Set condition
Clear condition
32 Hz
CTINTF.CT32HZIF
Signal falling edge (See Figure 13.4.1.)
Writing 1
8 Hz
CTINTF.CT8HZIF
Writing 1
2 Hz
CTINTF.CT2HZIF
Writing 1
1 Hz
CTINTF.CT1HZIF
Writing 1
256 Hz
128 Hz
64 Hz
32 Hz
16 Hz
8 Hz
4 Hz
2 Hz
1 Hz
32 Hz interrupt
8 Hz interrupt
2 Hz interrupt
1 Hz interrupt
Count clock
CTDAT.CTCNT0
CTDAT.CTCNT1
CTDAT.CTCNT2
CTDAT.CTCNT3
CTDAT.CTCNT4
CTDAT.CTCNT5
CTDAT.CTCNT6
CTDAT.CTCNT7
4.1 CT Interrupt Timings
Figure 13.
CT provides interrupt enable bits corresponding to each interrupt flag. An interrupt request is sent to the interrupt
controller only when the interrupt flag, of which interrupt has been enabled by the interrupt enable bit, is set. For
more information on interrupt control, refer to the “Interrupt Controller” chapter.