10 8-BiT TiMeR (T8)
10-6
Seiko epson Corporation
S1C17153 TeChniCal Manual
(Rev. 1.0)
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 desired wait time, the intervals between periodic interrupts, and the programmable
serial interface transfer clock.
T8 Ch.
x
Counter Data Register (T8_TC
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T8 Ch.
x
Counter Data
Register
(T8_TC
x
)
0x4244
(16 bits)
D15–8
–
reserved
–
–
–
0 when being read.
D7–0
TC[7:0]
Counter data
TC7 = MSB
TC0 = LSB
0x0 to 0xff
0xff
R
D[15:8] Reserved
D[7:0]
TC[7:0]: Counter Data Bits
The counter data can be read out. (Default: 0xff)
This register is read-only and cannot be written to.
T8 Ch.
x
Control Register (T8_CTl
x
)
Register name address
Bit
name
Function
Setting
init. R/W
Remarks
T8 Ch.
x
Control Register
(T8_CTl
x
)
0x4246
(16 bits)
D15–5
–
reserved
–
–
–
Do not write 1.
D4
TRMD
Count mode select
1 One shot
0 Repeat
0
R/W
D3–2
–
reserved
–
–
–
0 when being read.
D1
PReSeR
Timer reset
1 Reset
0 Ignored
0
W
D0
PRun
Timer run/stop control
1 Run
0 Stop
0
R/W
D[15:5] Reserved (Do not write 1.)
D4
TRMD: Count Mode Select Bit
Selects the count mode.
1 (R/W): One-shot mode
0 (R/W): Repeat mode (default)
Setting TRMD to 0 sets the timer to repeat mode. In this mode, once the count starts, the timer contin-
ues to run until stopped by the application program. When the counter underflows, the timer presets the
counter to the reload data register value and continues the count. Thus, the timer periodically outputs an
underflow pulse. Set the timer to this mode to generate periodic interrupts or to generate a serial trans-
fer clock.
Setting TRMD to 1 sets the timer to one-shot mode. In this mode, the 8-bit 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 counter to the reload data register value, then stops when an underflow
occurs. Set the timer to this mode to set a specific wait time.
D[3:2]
Reserved
D1
PReSeR: Timer Reset Bit
Resets the timer.
1 (W):
Reset
0 (W):
Ignored
0 (R):
Always 0 when read (default)
Writing 1 to this bit presets the counter to the reload data value.
D0
PRun: Timer Run/Stop Control Bit
Controls the timer RUN/STOP.
1 (R/W): Run
0 (R/W): Stop (default)
The timer starts counting when PRUN is written as 1 and stops when written as 0. When the timer is
stopped, the counter data is retained until reset or until the next RUN state.