38C3 Group User’s Manual
APPLICATION
2-19
2.2 Timer
2.2.3 Timer application examples
(1)
Basic functions and uses
[Function 1] Control of event interval (Timer 1 to Timer 6, Timer A: timer mode)
When a certain time, by setting a count value to each timer, has passed, the timer interrupt request occurs.
<Use>
Generating of an output signal timing
Generating of a wait time
[Function 2] Control of cyclic operation (Timer 1 to Timer 6, Timer A: timer mode)
The value of the timer latch is automatically written to the corresponding timer each time the timer
underflows, and each timer interrupt request occurs in cycles.
<Use>
Generating of cyclic interrupts
Clock function (measurement of 1 s); see “(2) Timer application example 1”
Control of a main routine cycle
[Function 3] Output of rectangular waveform
(Timer 1, Timer 3, Timer 6, Timer A: pulse output mode)
The output level of the T1OUT pin, T3OUT pin, PWM1 pin or TAOUT pin is inverted each time the timer
underflows.
<Use>
Piezoelectric buzzer output; see “(3) Timer application example 2”
Generating of the remote control carrier waveforms
[Function 4] Count of external pulses (Timer 2, Timer 4)
External pulses input to the CNTR0 pin, CNTR1 pin are counted as the timer count source (in the
event counter mode).
<Use>
Frequency measurement; see “(4) Timer application example 3”
Division of external pulses
Generating of interrupts due to a cycle using external pulses as the count source; count of a reel pulse
[Function 5] Output of PWM signal (Timer 6)
“H” interval and “L” interval are specified, respectively, and the output of pulses from P52/PWM1
pin is repeated.
<Use>
Control of electric volume
[Function 6] Output of IGBT control signal (Timer A: IGBT output mode)
The external signal which is input to INT0 pin is used as trigger, and the period and “H” interval
are specified, respectively, and the output of pulses from P50/TAOUT pin is repeated.
<Use>
IGBT control of IH heat equipment; see “(5) Timer application example 4”
IGBT control to magnetron
[Function 7] Output of PWM signal (Timer A: PWM mode)
The cycle and “H” interval are specified, respectively, and the output of pulses from P50/TAOUT pin
is repeated.
<Use>
Control of electric volume
IGBT control of IH heat equipment