11 16-BiT TiMeRS (T16)
11-2
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
T16 input Pins
11.2
Table 11.2.1 lists the input pins for the T16 module.
2.1 List of T16 Pins
Table 11.
Pin name
i/O
Qty
Function
EXCL0
I
1
Ch.0 external clock input pin
Inputs an external clock for the event counter function or an external sig-
nal for measuring the pulse width.
EXCL1
I
1
Ch.1 external clock input pin
Inputs an external clock for the event counter function or an external sig-
nal for measuring the pulse width.
EXCL2
I
1
Ch.2 external clock input pin
Inputs an external clock for the event counter function or an external sig-
nal for measuring the pulse width.
The T16 input pins (EXCL
x
) are shared with I/O ports. Setting the port to input mode enables it to be used as the
T16 input pin with a general-purpose input function. For detailed information on the port control, see the “I/O Ports
(P)” chapter.
Operating Modes
11.3
The T16 module has the following three operating modes:
1. Internal clock mode (normal timer for counting an internal clock)
2. External clock mode (functions as an event counter)
3. Pulse width measurement mode (measures the external input pulse width using an internal clock)
The operating mode is selected using CKSL[1:0]/T16_CTL
x
register.
3.1 Operating Mode Selection
Table 11.
CKSl[1:0]
Operating mode
0x3
Reserved
0x2
Pulse width measurement mode
0x1
External clock mode
0x0
Internal clock mode
(Default: 0x0)
internal Clock Mode
11.3.1
Internal clock mode uses a divided PCLK clock as the count clock.
The timer counts down from the initial value set in the reload data register and outputs an underflow signal when
the counter underflows. The underflow signal is used to generate an interrupt and an internal serial interface clock.
The time until underflow occurs can be finely programmed by selecting the clock division ratio and initial counter
value, making it useful for serial transfer clock generation and sporadic time measurement.
Count clock selection
The count clock is generated by dividing the PCLK clock into 1/1 to 1/16K. The division ratio can be selected
from the 15 types shown below using DF[3:0]/T16_CLK
x
register.
3.1.1 PCLK Division Ratio Selection
Table 11.
DF[3:0]
Division ratio
DF[3:0]
Division ratio
0xf
Reserved
0x7
1/128
0xe
1/16384
0x6
1/64
0xd
1/8192
0x5
1/32
0xc
1/4096
0x4
1/16
0xb
1/2048
0x3
1/8
0xa
1/1024
0x2
1/4
0x9
1/512
0x1
1/2
0x8
1/256
0x0
1/1
(Default: 0x0)