10 Fine MODe 8-BiT TiMeRS (T8F)
10-2
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
Count Clock
10.2
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]/T8F_CLK
x
register.
2.1 PCLK Division Ratio Selection
Table 10.
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)
notes: • The clock generator (CLG) must be configured to supply PCLK to the peripheral modules be-
fore running the timer.
• Make sure the counter is halted before setting the count clock.
For detailed information on the CLG control, see the “Clock Generator (CLG)” chapter.
Count Mode
10.3
The T8F module features two count modes: repeat mode and one-shot mode. These modes are selected using
TRMD/T8F_CTL
x
register.
Repeat mode (TRMD = 0, default)
Setting TRMD to 0 sets T8F to repeat mode.
In this mode, once the count starts, the timer continues running until stopped by the application program. When
the counter underflows, the timer presets the reload data register value into the counter and continues the count.
Thus, the timer periodically outputs an underflow pulse. T8F should be set to this mode to generate periodic
interrupts or to generate a serial transfer clock.
One-shot mode (TRMD = 1)
Setting TRMD to 1 sets T8F to one-shot mode.
In this mode, the timer stops automatically as soon as the counter underflows. This means only one interrupt
can be generated after the timer starts. Note that the timer presets the reload data register value to the counter,
then stops after an underflow has occurred. T8F should be set to this mode to set a specific wait time.
Reload Data Register and underflow Cycle
10.4
The reload data register T8F_TR
x
is used to set the initial value for the down counter.
The initial counter value set in the reload data register is preset to the down counter if the timer is reset or the coun-
ter underflows. If the timer is started after resetting, it counts down from the reload value (initial value). This means
that the reload value and the input clock frequency determine the time elapsed from the point at which the timer
starts until the underflow occurs (or between underflows). The time determined is used to obtain the specified wait
time, the intervals between periodic interrupts, and the programmable serial interface transfer clock.