13 16-BiT PWM TiMeRS (T16a2)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
13-3
OSC1 clock
External clock (EXCL5)
OSC3 clock
CLKSRC[1:0]
MULTIMD
CLKDIV[3:0]
Counter Ch.0
CLKEN
Divider
(1/1–1/16K)
Divider
(1/1–1/256)
Clock controller Ch.0
IOSC clock
Divider
(1/1–1/16K)
External clock (EXCL6)
Counter Ch.1
Clock controller Ch.1
3.1 Clock Controller
Figure 13.
Clock source selection
The clock source can be selected from IOSC, OSC3, OSC1, or external clock using CLKSRC[1:0]/T16A_
CLK
x
register.
3.1 Clock Source Selection
Table 13.
ClKSRC[1:0]
Clock source
0x3
External clock (EXCL
x
)
0x2
OSC3
0x1
OSC1
0x0
IOSC
(Default: 0x0)
When external clock is selected, the timer can be used as an event counter or for measuring pulse widths by
inputting an external clock or pulses. The table below lists the external clock input pins. It is not necessary to
switch their pin functions from general-purpose I/O port. However, do not set the I/O port to output mode.
3.2 External Clock Input Pins
Table 13.
Channel
external clock input pin
T16A2 Ch.0
EXCL5
T16A2 Ch.1
EXCL6
internal clock division ratio selection
When an internal clock (IOSC, OSC3, or OSC1) is selected, use CLKDIV[3:0]/T16A_CLK
x
register to select
the division ratio.
3.3 Internal Clock Division Ratio Selection
Table 13.
ClKDiV[3:0]
Division ratio
Clock source = iOSC or OSC3
Clock source = OSC1
0xf
Reserved
0xe
1/16384
Reserved
0xd
1/8192
Reserved
0xc
1/4096
Reserved
0xb
1/2048
Reserved
0xa
1/1024
Reserved
0x9
1/512
Reserved
0x8
1/256
0x7
1/128
0x6
1/64
0x5
1/32
0x4
1/16
0x3
1/8
0x2
1/4
0x1
1/2
0x0
1/1
(Default: 0x0)