17 16-BIT PWM TIMERS (T16B)
17-16
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
Counter
Trigger signal
0xffff
0x0000
T16B_nCCCTLm.CAPTRG[1:0] bits = 0x3 (Trigger: falling and rising edges)
An overwrite error occurs as the T16B_nINTF.CMPCAPmIF bit has not been cleared.
Time
Captured value
(T16B_nCCRm register)
RUN = 1
CC[15:0]
→
Data (R)
CMPCAPmIF = 1
CMPCAPmIF = 1
Counter value
→
CC[15:0] Counter value
→
CC[15:0]
Counter value
→
CC[15:0]
CMPCAPmIF = 1
CAPOWmIF = 1
CC[15:0]
→
Data (R)
CMPCAPmIF = 0
MODEN = 1
PRESET = 1
Software operation
Hardware operation
Figure 17.4.3.3 Operations in Capture Mode (Example in One-shot Up Count Mode)
Synchronous capture mode/asynchronous capture mode
The capture circuit can operate in two operating modes: synchronous capture mode and asynchronous cap-
ture mode.
Synchronous capture mode is provided to avoid the possibility of invalid data reading by capturing counter
data simultaneously with the counter being counted up/down. Set the T16B_
n
CCCTL
m
.SCS bit to 1 to set
the capture circuit to synchronous capture mode. This mode captures counter data by synchronizing the
capture signal with the counter clock.
On the other hand, asynchronous capture mode can capture counter data by detecting a trigger pulse even if
the pulse is shorter than the counter clock cycle that becomes invalid in synchronous capture mode. Set the
T16B_
n
CCCTL
m
.SCS bit to 0 to set the capture circuit to asynchronous capture mode.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
Count clock
T16B_nTC.TC[15:0]
Capture trigger signal
T16B_nCCRm.CC[15:0]
Capturing operation
(When T16B_nCCCTLm.CAPTRG[1:0] bits = 0x3)
(1) Synchronous capture mode
1
5
Count clock
T16B_nTC.TC[15:0]
Capture trigger signal
T16B_nCCRm.CC[15:0]
Capturing operation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
(When T16B_nCCCTLm.CAPTRG[1:0] bits = 0x3)
(2) Asynchronous capture mode
1
5
10
11
Figure 17.4.3.4 Synchronous Capture Mode/Asynchronous Capture Mode