SIC63616-(Rev. 1.0) NO. P105
3240-0412
4.9.7 Interrupt function
The programmable timer can generate interrupts from the underflow and compare match signals of each
timer. See Figures 4.9.3.1 and 4.9.5.1 for the interrupt timing.
Note: The compare match interrupt can be generated only when the timer is set to PWM mode.
The underflow and compare match signals set the corresponding interrupt factor flag IPTx and ICTCx to
"1", and an interrupt is generated. The interrupt can also be masked by setting the corresponding interrupt
mask registers EIPTx and ECTCx. However, the interrupt factor flag is set to "1" by an underflow/compare
match of the corresponding timer regardless of the interrupt mask register setting.
When Timers 0 and 1 are used as a 16-bit timer, an interrupt is generated by an underflow of Timer 1. In this
case, IPT0 is not set to "1" by a Timer 0 underflow. The compare match interrupt uses ICTC1 of Timer 1. The
same applies when other timers are used as a 16-bit timer.
4.9.8 Control of TOUT output
The programmable timer Ch.A (Timers 0 and 1) can generate the TOUT_A signal from the timer underflow
and compare match signals. The TOUT_A signal is generated by dividing the underflow signal by 2 in
normal mode. In PWM mode, the PWM signal generated as described above is output as the TOUT_A
signal.
Table 4.9.8.1 TOUT outputs and control registers
Output select register
CHSEL_A="0"
CHSEL_A="1"
Output control register
PTOUT_A
Output clock name
TOUT_A
Output terminal
P13
Output timer
Timer 0
Timer 1
It is possible to select either Timer 0 or Timer 1 output to be used by the TOUT output channel select
register CHSEL_A.
In 16-bit timer mode, Timer 1 is always selected for generating the TOUT_A signal regardless of how
CHSEL_A is set.
The TOUT signal generated by each timer can be output from the P13 I/O port terminal to supply a clock
to an external device.
The output of the TOUT_A signal is controlled by the PTOUT_A register. When "1" is written to the
PTOUT_A register, the TOUT_A signal is output from the corresponding I/O port terminal.
When TOUT output is enabled, the I/O port is automatically set to output mode and it outputs the
TOUT_A signal sent from the timer. The I/O control register (IOC13) and the data register (P13) are
ineffective. When PTOUT_A is set to "0", the I/O port control registers become effective.
Since the TOUT_A signal is generated asynchronously from the PTOUT_A register, a hazard within 1/2
cycle is generated when the signal is turned on and off by setting the register.
Figure 4.9.8.1 shows the output waveform of the TOUT_A signal.
PTOUT_A
TOUT_A output
0
1
Fig. 4.9.8.1 Output waveform of the TOUT_A signal
The TOUT output by Ch.B to Ch.D is not available.
Содержание S1C63616
Страница 1: ...S1C63616 Technical Manual Rev 1 0 ...