English
Language : 

M38203M4 Datasheet, PDF (171/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
APPLICATION
2.4 Timer 1, timer 2, and timer 3
2.4 Timer 1, timer 2, and timer 3
2.4.1 Explanation of operations
Timer 1 to timer 3 are 8-bit timers that operate in the timer mode. The timer mode is a count-down system,
so the value of the counter is decremented each time a count source is input. When the counter underflows,
an interrupt request occurs.
The timer 2 can also output a pulse whose polarity is reversed at each underflow.
(1) Timer mode
Operation of the timers 1 to 3 in the timer mode are described below.
xStart of count operation
A count operation is automatically started after reset release.
The value of the counter is decremented by 1 each time a count source is input.
Reload operation
The counter underflows at the first count pulse after the value of the counter reaches “0016.” At this
time, the value of the corresponding timer latch is transferred (reloaded) to the counter.
ŽInterrupt operation
An interrupt request occurs at the counter underflow. At the same time, the corresponding interrupt
request bit is set to “1.” The occurrence of each interrupt is controlled by the interrupt enable bit.
The acceptance of the interrupt request causes the interrupt request bit which has been set to “1”
to be automatically cleared to “0.” It can also be cleared to “0” by software. An interrupt request
occurs each time the counter underflows. In other words, an interrupt request occurs every “the
counter initial value + 1” count of the rising edge of the count source.
Figure 2.4.1 shows a timer mode operation example.
3820 GROUP USER’S MANUAL
2–85