17 16-BIT PWM TIMERS (T16B)
S1C31D50/D51 TECHNICAL MANUAL
Seiko Epson Corporation
17-7
(Rev. 2.00)
0xffff
0x0000
RUN = 1
RUN = 1
MODEN = 1
PRESET = 1
RUN = 0
Counter
(1) Repeat down count mode
Count cycle
Time
MAX value
Software operation
Hardware operation
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
Data (W)
→
MC[15:0]
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 17.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.