15 16-BIT PWM TIMER (T16A5)
15-12
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
When CBUFEN is set to 0, compare data is written directly to the compare A and compare B registers.
Compare data is always read from compare A and compare B registers.
D2
TMMD: Count Mode Select Bit
Selects the count mode.
1 (R/W): One-shot mode
0 (R/W): Repeat mode (default)
Setting TMMD to 0 sets the counter to repeat mode. In this mode, once the count starts, the counter
continues counting until stopped by the application program.
Setting TMMD to 1 sets the counter to one-shot mode. In this mode, the counter stops counting auto-
matically as soon as the counter is reset by the compare B signal as well as stopped via software.
D1
PRESET: Counter Reset Bit
Resets the counter.
1 (W):
Reset
0 (W):
Ignored
0 (R):
Normally 0 when read out (default)
Writing 1 to this bit resets the counter to 0.
D0
PRUN: Counter Run/Stop Control Bit
Starts/stops the count.
1 (W):
Run
0 (W):
Stop
1 (R):
Counting
0 (R):
Stopped (default)
The counter starts counting when PRUN is written as 1 and stops when written as 0. The counter data is
retained even if the counter is stopped.
T16A5 Ch.
x
Counter Data Registers (T16A_TC
x
)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
T16A5 Ch.
x
Counter Data
Register
(T16A_TC
x
)
0x301182
0x301192
(16 bits)
D15–0 T16ATC
[15:0]
Counter data
T16ATC15 = MSB
T16ATC0 = LSB
0x0 to 0xffff
0x0
R
D[15:0] T16ATC[15:0]: Counter Data Bits
Counter data can be read out. (Default: 0x0)
The counter value can be read out even if the counter is running. However, the counter value should be
read at once using a 16-bit transfer instruction. If data is read twice using an 8-bit transfer instruction,
the correct value may not be obtained due to occurrence of count up between readings.
Note: The counter value must be read from the T16A_TC
x
register of the channel selected using
T16SEL[1:0]/T16A_CTL
x
register.