78
EPSON
S1C63666 TECHNICAL MANUAL
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Programmable Timer)
4.11 Programmable Timer
4.11.1 Configuration of programmable timer
The S1C63666 has three 8-bit programmable timer systems (timer 0, timer 1 and timer 2) built-in.
The timers are composed of 8-bit presettable down counters and they can be used as 8 bits
×
3 channels or
16 bits
×
1 c 8 bits
×
1 channel of programmable timers. Timer 0 also has an event counter
function using the K13 input port terminal.
Figure 4.11.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 2 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 buffer
PTD20–PTD27
Timer 2
PTPS20
PTPS21
8-bit
down counter
Prescaler
Clock
control
circuit
Prescaler
setting
Under-
flow
signal
Data bus
Interrupt
request
CHSEL0
CHSEL1
TOUT
(R02)
Serial
interface
Selector
CKSEL1
MOD16
Timer 1 Run/Stop
PTRST0
Timer 0 reset
PTRST2
Timer 2 reset
2,048 Hz
Divider
OSC3
oscillation
circuit
Interrupt
control
circuit
OSC1
oscillation
circuit
f
OSC3
f
OSC1
1/2
PTOUT
Selector
Output port
R02
Reload data register
RLD20–RLD27
Data buffer
PTD10–PTD17
Timer 1
PTPS10
PTPS11
8-bit
down counter
Prescaler
Selector
Clock
control
circuit
Prescaler
setting
Under-
flow
signal
PTRST1
Timer 1 reset
16-bit mode selection
Reload data register
RLD10–RLD17
1/2
PTRUN1
Selector
CKSEL2
Timer 2 Run/Stop
PTRUN2
Input port
K13
EVCNT
Event counter mode setting
K13
Fig. 4.11.1.1 Configuration of programmable timer
Содержание S1C63666
Страница 1: ...Technical Manual CMOS 4 BIT SINGLE CHIP MICROCOMPUTER S1C63666 Technical Hardware S1C63666 ...
Страница 4: ......
Страница 6: ......