14 16-BIT PWM TIMERS (T16B)
14-24
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
Table 14.6.2 Count Mode
T16BnCTL.CNTMD[1:0] bits
Count mode
T16BnCTL.ONEST bit = 1
T16BnCTL.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 run-
ning, 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 T16BnCTL.PRESET bit and the counting start operation
using the T16BnCTL.RUN bit take effect only when the T16BnCTL.MODEN bit = 1.
T16B Ch.
n
Max Counter Data Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
T16BnMC
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 T16BnMC.MC[15:0] bits (MAX value) dur-
ing counting.
• Make sure the T16BnCTL.MODEN bit is set to 1 before writing data to the T16BnMC.
MC[15:0] bits. If the T16BnCTL.MODEN bit = 0 when writing to the T16BnMC.MC[15:0] bits,
set the T16BnCTL.MODEN bit to 1 until the T16BnCS.BSY bit is set to 0 from 1.
• Do not set the T16BnMC.MC[15:0] bits to 0x0000.
T16B Ch.
n
Timer Counter Data Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
T16BnTC
15–0 TC[15:0]
0x0000
H0
R
–