Epson S1C17M20 Technical Manual page 189

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

PRESET = 1
RUN = 1
MODEN = 1
Trigger signal
0xffff
Counter
0x0000
CMPCAPmIF = 1
Counter value → CC[15:0]
Figure 15.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 T16BnCCCTLm.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
T16BnCCCTLm.SCS bit to 0 to set the capture circuit to asynchronous capture mode.
(1) Synchronous capture mode
Count clock
T16BnTC.TC[15:0]
Capture trigger signal
T16BnCCRm.CC[15:0]
Capturing operation
(2) Asynchronous capture mode
Count clock
T16BnTC.TC[15:0]
Capture trigger signal
T16BnCCRm.CC[15:0]
Capturing operation
Figure 15.4.3.4 Synchronous Capture Mode/Asynchronous Capture Mode
S1C17M20/M21/M22/M23/M24/M25
TECHNICAL MANUAL (Rev. 1.0)
T16BnCCCTLm.CAPTRG[1:0] bits = 0x3 (Trigger: falling and rising edges)
CC[15:0] → Data (R)
CC[15:0] → Data (R)
CMPCAPmIF = 1
CMPCAPmIF = 0
CMPCAPmIF = 1
Counter value → CC[15:0]
An overwrite error occurs as the T16BnINTF.CMPCAPmIF bit has not been cleared.
0
1
2
3
1
0
1
2
3
1
Seiko Epson Corporation
CAPOWmIF = 1
Counter value → CC[15:0]
(When T16BnCCCTLm.CAPTRG[1:0] bits = 0x3)
4
5
6
7
8
(When T16BnCCCTLm.CAPTRG[1:0] bits = 0x3)
4
5
6
7
8
5
15 16-BIT PWM TIMERS (T16B)
Software operation
Hardware operation
Captured value
(T16BnCCRm register)
Time
9
10
11
12
13
5
9
10
11
12
13
10
11
14
14
15-15

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17m25S1c17m21S1c17m22S1c17m23S1c17m24

Table of Contents