|
M38203M4 Datasheet, PDF (118/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER | |||
|
◁ |
APPLICATION
2.3 Timer X and timer Y
2.3 Timer X and timer Y
2.3.1 Explanation of timer X operations
Timer X has 4 modes of operation.
Operation in each mode is described below.
(1) Timer mode
Operation in the timer mode is described below.
xStart of count operation
Immediately after reset release, the timer X stop control bit is in the â0â state. For this reason, the
count operation is automatically started after reset release.
The value of the timer X counter (referred as âthe X counterâ) is decremented by 1 each time a count
source is input.
The count source is f(XIN)/16 clock (low-speed mode ; f(XCIN)/16 clock).
ÂReload operation
The X counter underflows at the first count pulse after the value of the X counter reaches â0016.â
At this time, the value of the timer X latch (referred as âthe X latchâ) is transferred (reloaded) to the
X counter.
ÂInterrupt operation
An interrupt request occurs at the X counter underflow. At the same time, the timer X interrupt
request bit is set to â1.â The occurrence of an interrupt is controlled by the timer X interrupt enable
bit.
An interrupt request occurs each time the counter underflows. In other words, an interrupt request
occurs every âthe X counter initial value + 1â count of the rising edge of the count source.
ÂStop of count operation
By writing â1â to the timer X stop control bit by software, the count operation is stopped.
The count operation is continued until â1â is set to the timer X stop control bit.
Figure 2.3.1 shows a timer mode operation example.
2â32
3820 GROUP USERâS MANUAL
|
▷ |