
17 16-BIT PWM TIMERS (T16B)
S1C31D50/D51 TECHNICAL MANUAL
Seiko Epson Corporation
17-25
(Rev. 2.00)
Table 17.7.2 Count Mode
T16B_nCTL.CNTMD[1:0] bits
Count mode
T16B_nCTL.ONEST bit = 1
T16B_nCTL.ONEST bit = 0
0x3
Reserved
0x2
One-shot up/down count mode
Repeat up/down count mode
0x1
One-shot down count mode
Repeat down count mode
0x0
One-shot up count mode
Repeat up count mode
Bit 2
RUN
This bit starts/stops counting.
1 (W):
Start counting
0 (W):
Stop counting
1 (R):
Counting
0 (R):
Idle
By writing 1 to this bit, the counter block starts count operations. However, the T16B_
n
CTL.MODEN
bit must be set to 1 in conjunction with this bit or it must be set in advance. While the timer is running,
writing 0 to the T16B_
n
CTL.RUN bit stops count operations. When the counter stops by the counter
MAX/ZERO signal in one-shot mode, this bit is automatically cleared to 0.
Bit 1
PRESET
This bit resets the counter.
1 (W):
Reset
0 (W):
Ineffective
1 (R):
Resetting in progress
0 (R):
Resetting finished or normal operation
In up mode or up/down mode, the counter is cleared to 0x0000 by writing 1 to this bit. In down mode,
the MAX value, which has been set to the T16B_
n
MC register, is preset to the counter. However, the
T16B_
n
CTL.MODEN bit must be set to 1 in conjunction with this bit or it must be set in advance.
Bit 0
MODEN
This bit enables the T16B Ch.
n
operations.
1 (R/W): Enable (Start supplying operating clock)
0 (R/W): Disable (Stop supplying operating clock)
Note: The counter reset operation using the T16B_nCTL.PRESET bit and the counting start operation
using the T16B_nCTL.RUN bit take effect only when the T16B_nCTL.MODEN bit = 1.
T16B Ch.
n
Max Counter Data Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
T16B_nMC
15–0 MC[15:0]
0xffff
H0
R/W –
Bits 15–0 MC[15:0]
These bits are used to set the MAX value to preset to the counter. For more information, refer to
“Counter Block Operations - MAX counter data register.”
Notes: • When one-shot mode is selected, do not alter the T16B_nMC.MC[15:0] bits (MAX value) dur-
ing counting.
• Make sure the T16B_nCTL.MODEN bit is set to 1 before writing data to the T16B_nMC.
MC[15:0] bits. If the T16B_nCTL.MODEN bit = 0 when writing to the T16B_nMC.MC[15:0]
bits, set the T16B_nCTL.MODEN bit to 1 until the T16B_nCS.BSY bit is set to 0 from 1.
• Do not set the T16B_nMC.MC[15:0] bits to 0x0000.
T16B Ch.
n
Timer Counter Data Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
T16B_nTC
15–0 TC[15:0]
0x0000
H0
R
–