14 16-BIT PWM TIMERS (T16B)
S1C17M12/M13 TECHNICAL MANUAL
Seiko Epson Corporation
14-7
(Rev. 1.2)
RUN = 1
RUN = 1
PRESET = 1
PRESET = 1
0xffff
0x0000
MAX value
Counter
(2) One-shot down count mode
Time
Data (W)
→
MC[15:0]
MODEN = 1
Data (W)
→
MC[15:0]
RUN = 0
RUN = 0
Figure 14.4.2.2 Operations in Repeat Down Count and One-shot Down Count Modes
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.
0xffff
0x0000
RUN = 1
RUN = 1
RUN = 1
MODEN = 1
PRESET = 1
PRESET = 1
0xffff
0x0000
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
MODEN = 1
RUN = 1
RUN = 0
Counter
(1) Repeat up/down count mode
Count cycle
Time
MAX value
MAX value
Software operation
Hardware operation
Counter
(2) One-shot up/down count mode
Time
RUN = 0
Figure 14.4.2.3 Operations in Repeat Up/Down Count and One-shot Up/Down Count Modes