17-8
Seiko Epson Corporation
S1C31D50 TECHNICAL MANUAL
(Rev. 1.00)
Operations in repeat up/down count and one-shot up/down count modes
In these modes, the counter operates as an up/down counter and counts as 0x0000 (or current
value)
→
the MAX value
→
0x0000.
In repeat up/down count mode, the counter repeats counting up from 0x0000 to the MAX value
and counting down from the MAX value to 0x0000 until the T16B_
n
CTL.RUN bit is set to 0. If the
MAX value is altered to a value larger than the current counter value during count up operation, the
counter keeps counting up to the new MAX value. If the MAX value is altered to a value smaller
than the current counter value, the counter is cleared to 0x0000 and continues counting up to the
new MAX value. If the MAX value is altered during count down operation, the counter keeps counting
down to 0x0000 and then starts counting up to the new MAX value. In one-shot up/down count
mode, the counter stops automatically when it reaches 0x0000 during count down operation.
(1)
Repeat up/down count mode
(2)
One-shot up/down count mode
Figure 17.4.2.3 Operations in Repeat Up/Down Count and One-shot Up/Down Count Modes
17.4.3.
Comparator/Capture Block Operations
The comparator/capture block functions as a comparator to compare the counter value with the register
value set or a capture circuit to capture counter values using the external/software trigger signals.
Comparator/capture block operating mode
The comparator/capture block includes two systems (four or six systems) of comparator/capture
circuits and each system can be set to comparator mode or capture mode, individually.
Set the T16B_
n
CCCTL
m
.CCMD bit to 0 to set the comparator/capture circuit
m
to comparator mode
or 1 to set it to capture mode.
RUN = 1
RUN = 1
MODEN = 1
PRESET = 1
RUN = 0
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
Software operation
Hardware operation
0xffff
0x0000
Count cycle
Counter
MAX value
Time
RUN = 0
RUN = 1
MODEN = 1
PRESET = 1
Data (W)
→
MC[15:0]
RUN = 1
Data (W)
→
MC[15:0]
0xffff
0x0000
Counter
MAX value
Time
Summary of Contents for S1C31D50
Page 461: ...25 1 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 25 Package TQFP12 48PIN ...
Page 462: ...25 2 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP13 64PIN ...
Page 463: ...25 3 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 TQFP14 80PIN ...
Page 464: ...25 4 Seiko Epson Corporation S1C31D50 TECHNICAL MANUAL Rev 1 00 QFP15 100PIN ...