13 16-BiT PWM TiMeRS (T16a2)
13-8
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
Reading Counter Values
13.5.3
The counter value can be read from T16ATC[15:0]/T16A_TC
x
register even if the counter is running. However, the
counter value should be read at once using a 16-bit transfer instruction. If data is read twice using an 8-bit transfer
instruction, the correct value may not be obtained due to occurrence of count up between readings.
Counter Operation and interrupt Timing Charts
13.5.4
Comparator mode
PRUN
PRESET
T16A_CCA
x
T16A_CCB
x
Count clock
T16A_TC
x
Reset
Compare A
interrupt
Reset and
compare B
interrupt
Compare A
interrupt
Reset and
compare B
interrupt
0
1
2
3
4
5
0
1
2
3
4
5
0
1
0x2
0x5
5.4.1 Operation Timing in Comparator Mode
Figure 13.
Capture mode
PRUN
PRESET
CAP(A)
CAP(B)
Count clock
T16A_TC
x
T16A_CCA
x
T16A_CCB
x
(when CAPATRG[1:0] = 0x1, CAPBTRG[1:0] = 0x3)
Reset
Capture A
interrupt
Capture B
interrupt
Capture B
interrupt
(and capture B overwrite
interrupt if CAPBIF = 1)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
3
6
11
5.4.2 Operation Timing in Capture Mode
Figure 13.
Timer Output Control
13.6
The timer that has been set in comparator mode can generate TOUT signals using the compare A and compare B
signals and can output it to external devices. Each timer channel provides two TOUT outputs, thus the T16A2 mod-
ule can output up to four TOUT signals. Figure 13.6.1 shows the TOUT output circuit (one timer channel).
TOUT A
output
control
Compare A signal
Compare B signal
TOUTAMD[1:0]
TOUTAINV
TOUTA
x
TOUT B
output
control
Compare A signal
Compare B signal
TOUTBMD[1:0]
TOUTBINV
TOUTB
x
Comparator/capture block Ch.
x
6.1 TOUT Output Circuit
Figure 13.