Epson S1C17624 Technical Manual page 151

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

13 16-BiT PWM TiMeRS (T16a2)
13.5.3
Reading Counter Values
The counter value can be read from T16ATC[15:0]/T16A_TCx 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.
13.5.4
Counter Operation and interrupt Timing Charts
Comparator mode
PRUN
PRESET
T16A_CCAx
T16A_CCBx
Count clock
T16A_TCx
Reset
Capture mode
PRUN
PRESET
CAP(A)
CAP(B)
Count clock
T16A_TCx
T16A_CCAx
T16A_CCBx
Reset
13.6
Timer Output Control
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).
13-8
0
1
2
3
4
Compare A
interrupt
Figure 13.
5.4.1 Operation Timing in Comparator Mode
(when CAPATRG[1:0] = 0x1, CAPBTRG[1:0] = 0x3)
0
1
2
3
4
Capture A
interrupt
Figure 13.
5.4.2 Operation Timing in Capture Mode
Comparator/capture block Ch.x
TOUT A
Compare A signal
Compare B signal
TOUTAMD[1:0]
control
TOUTAINV
Compare A signal
TOUT B
Compare B signal
control
TOUTBMD[1:0]
TOUTBINV
Figure 13.
6.1 TOUT Output Circuit
Seiko epson Corporation
0x2
0x5
5
0
1
2
3
Reset and
Compare A
compare B
interrupt
interrupt
5
6
7
8
9
3
6
Capture B
interrupt
output
TOUTAx
output
TOUTBx
S1C17624/604/622/602/621 TeChniCal Manual
4
5
0
1
Reset and
compare B
interrupt
10
11
12
13
11
Capture B
interrupt
(and capture B overwrite
interrupt if CAPBIF = 1)

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17604S1c17622S1c17602S1c17621

Table of Contents