
3850 Group (Spec. H) User’s Manual
APPLICATION
2-27
2.3 Timer
2.3.3 Timer application examples
(1) Basic functions and uses
[Function 1] Control of Event interval (Timer X, Timer Y, Timer 1, Timer 2)
When a certain time, by setting a count value to each timer, has passed, the timer interrupt request
occurs.
<Use>
Generation of an output signal timing
Generation of a wait time
[Function 2] Control of Cyclic operation (Timer X, Timer Y, Timer 1, Timer 2)
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>
Generation of cyclic interrupts
Clock function (measurement of 250 ms); see Application example 1
Control of a main routine cycle
[Function 3] Output of Rectangular waveform (Timer X, Timer Y)
The output level of the CNTR pin is inverted each time the timer underflows (in the pulse output
mode).
<Use>
Piezoelectric buzzer output; see Application example 2
Generation of the remote control carrier waveforms
[Function 4] Count of External pulses (Timer X, Timer Y)
External pulses input to the CNTR pin are counted as the timer count source (in the event counter
mode).
<Use>
Frequency measurement; see Application example 3
Division of external pulses
Generation of interrupts due to a cycle using external pulses as the count source; count of a
reel pulse
[Function 5] Measurement of External pulse width (Timer X, Timer Y)
The “H” or “L” level width of external pulses input to CNTR pin is measured (in the pulse width
measurement mode).
<Use>
Measurement of external pulse frequency (measurement of pulse width of FG pulse for a
motor); see Application example 4
Measurement of external pulse duty (when the frequency is fixed)
FG pulse: Pulse used for detecting the motor speed to control the motor speed.