
S1C63406 TECHNICAL MANUAL
EPSON
61
CHAPTER 4: PERIPHERAL CIRCUITS AND OPERATION (Programmble Timer)
4.10.2.4 Interrupt function
The programmable timer can generate an interrupt due to an underflow of the timer 0 and timer 1. See
Figure 4.10.2.1.1 for the interrupt timing.
An underflow of timer 0 and timer 1 sets the corresponding interrupt factor flag IPT0 (timer 0) or IPT1
(timer 1) to "1", and generates an interrupt. The interrupt can also be masked by setting the correspond-
ing interrupt mask register EIPT0 (timer 0) or EIPT1 (timer 1). However, the interrupt factor flag is set to
"1" by an underflow of the corresponding timer regardless of the interrupt mask register setting.
4.10.2.5 Setting of TOUT output
The programmable timer can generate a TOUT signal due to an underflow of timer 0 or timer 1. The
TOUT signal is generated by dividing the underflows in 1/2. It is possible to select which timer's under-
flow is to be used by the TOUT output channel selection register CHSEL. When "0" is written to the
CHSEL register, timer 0 is selected and when "1" is written, timer 1 is selected.
Figure 4.10.2.5.1 shows the TOUT signal waveform when the channel is changed.
Timer 0 underflow
Timer 1 underflow
CHSEL
0
1
TOUT output (R12)
Fig. 4.10.2.5.1 TOUT signal waveform at channel change
The TOUT signal can be output from the R12 terminal. Programmable clocks can be supplied to external
devices.
Figure 4.10.2.5.2 shows the configuration of the R12 port.
Data
bus
Register
PTOUT
Register
R12
TOUT
R12
(TOUT)
Fig. 4.10.2.5.2 Configuration of R12
The output of the TOUT signal is controlled by the PTOUT register. When "1" is written to the PTOUT
register, the TOUT signal is output from the R12 terminal and when "0" is written, the terminal goes high
(VDD) level. However, the data register R12 must always be "1".
Since the TOUT signal is generated asynchronously from the PTOUT register, a hazard within 1/2 cycle is
generated when the signal is turned ON and OFF by setting the register.
Figure 4.10.2.5.3 shows the output waveform of the TOUT signal.
R12 register
PTOUT register
TOUT output
Fix at "1"
"1"
"0"
Fig. 4.10.2.5.3 Output waveform of the TOUT signal