|
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
|
▷ |