
60
EPSON
S1C63808 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Programmable Timer)
4.9 Programmable Timer
4.9.1 Configuration of programmable timer
The S1C63808 has two 8-bit programmable timer systems (timer 0 and timer 1) built-in.
The timers are composed of 8-bit presettable down counters and they can be used as 8 bits
× 2 channels or
16 bits
× 1 channel of programmable timers. Timer 0 also has an event counter function using the K13
input port terminal.
Figure 4.9.1.1 shows the configuration of the programmable timer.
The programmable timer is designed to count down from the initial value set in the counter with soft-
ware. An underflow according to the initial value occurs by counting down and is used for the following
functions:
Presetting the initial value to the counter to generate the periodical underflow signal
Generating an interrupt
Generating a TOUT signal output from the R02 output port terminal
Generating the synchronous clock source for the serial interface (timer 1 underflow is used, and it is
possible to set the transfer rate)
Reload data register
RLD00–RLD07
Data buffer
PTD00–PTD07
PTRUN0
FCSEL
PLPOL
Timer 0
PTPS00
PTPS01
8-bit
down counter
Prescaler
Selector
CKSEL0
Timer 0 Run/Stop
Clock
control
circuit
Timer function setting
Pulse polarity setting
Prescaler
setting
Under-
flow
signal
Data
bus
Interrupt
request
CHSEL0
TOUT
(R02)
Serial
interface
Selector
CKSEL1
MOD16
Timer 1 Run/Stop
PTRST0
Timer 0 reset
2,048 Hz
Divider
OSC3
oscillation
circuit
Interrupt
control
circuit
OSC1
oscillation
circuit
fOSC3
fOSC1
1/2
PTOUT
Selector
Output port
R02
Data buffer
PTD10–PTD17
Timer 1
PTPS10
PTPS11
8-bit
down counter
Prescaler
Selector
Prescaler
setting
Under-
flow
signal
PTRST1
Timer 1 reset
16-bit mode selection
Reload data register
RLD10–RLD17
1/2
PTRUN1
Input port
K13
EVCNT
Event counter mode setting
K13
Clock
control
circuit
Fig. 4.9.1.1 Configuration of programmable timer
Note: If the TOUT terminal is used to drive an external component that consumes a large amount of
current such as a bipolar transistor, design the pattern of traces on the printed circuit board so that
the operation of the external component does not affect the IC power supply. Refer to <Output
Terminals> in Section 5.3, "Precautions on Mounting", for more information.