77
3819 Group USER’S MANUAL
2. APPLICATION
MITSUBISHI MICROCOMPUTER
3819 Group
2.2 Timer
2.2.2 Timer application examples
(1) Basic functions and uses
[
Function 1 ]
]
Control of Event interval (Timers 1 to 6)
The Timer count stop bit is set to “0” after setting a count value to a timer. Then a timer interrupt request
occurs after a certain period.
[
Use ]
]
Generation of an output signal timing
Generation of a waiting time
[
Function 2 ]
]
Control of Cyclic operation : Generation of synchronous timing (Timers 1 to 6)
The value of a timer latch is automatically written to a timer each time a timer underflows, and a timer
interrupt request occurs.
[
Use ]
]
Generation of cyclic interrupts
Clock function (measurement of one second) Application example 1
Control of a main routine cycle
[
Function 3 ]
]
Output of Rectangular waveform (Timers 1 and 3)
The output level of the TOUT pin is inverted every time a timer underflows. To output long-interval rectangular
waveforms (when division of 8 bits or more is necessary), the Timers 2 and 3 are connected .
[
Use ]
]
A piezoelectric buzzer output Application example 2
Generation of the remote-control carrier waveforms
[
Function 4] Count of External pulse (Timers 2 and 4)
External pulses input to the CNTR pin are selected as a timer count source.
[
Use ]
]
Measurement of frequency (judging if the Video synchronization signal exits) Application example 3
Division of external pulses and generation of interrupts in a cycle based on an external pulse.
(count of a reel pulse)
[
Function 5 ]
]
Output of PWM signal (Timer 6)
The pulses with each specified intervals of “H” and “L” are output.
[
Use ]
]
Control of an electronic volume (connected with VCA)