English
Language : 

M37702M2AXXXFP Datasheet, PDF (16/60 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
M37702M2AXXXFP, M37702M2BXXXFP
M37702S1AFP, M37702S1BFP
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
TIMER
There are eight 16-bit timers. They are divided by type into timer A
(5) and timer B (3).
The timer I/O pins are shared with I/O pins for port P5 and P6. To
use these pins as timer input pins, the data direction register bit
corresponding to the pin must be cleared to “0” to specify input
mode.
TIMER A
Figure 11 shows a block diagram of timer A.
Timer A has four modes; timer mode, event counter mode, one-
shot pulse mode, and pulse width modulation mode. The mode is
selected with bits 0 and 1 of the timer Ai mode register (i = 0 to 4).
Each of these modes is described below.
(1) Timer mode [00]
Figure 12 shows the bit configuration of the timer Ai mode register
during timer mode. Bits 0, 1, and 5 of the timer Ai mode register
must always be “0” in timer mode.
Bit 3 is ignored if bit 4 is “0”.
Bits 6 and 7 are used to select the timer counter source.
The counting of the selected clock starts when the count start flag
is “1” and stops when it is “0”.
Figure 13 shows the bit configuration of the count start flag. The
counter is decremented, an interrupt is caused and the interrupt
request bit in the timer Ai interrupt control register is set when the
contents becomes 000016. At the same time, the contents of the
reload register is transferred to the counter and count is contin-
ued.
f(X IN) 1/2
f2
f16
f32
1/8
1/2
1/2
f64
f512
1/8
Clock source selection
f2
f16
f64
f512
• Timer
• One-shot
• Pulse width modulation
Timer (gate function)
Polarity
TAi IN selection
(i = 0 – 4)
Event counter
External trigger
Pulse output
TAi OUT
(i = 0 – 4)
Data bus (odd)
Data bus (even)
(Lower 8 bits)
Reload register(16)
(Higher 8 bits)
Count start flag
(4016)
Down count
Up-down flag
(4416)
Counter(16)
Up/Down
Always decremented
except in event count mode
Addresses
Timer A0 4716 4616
Timer A1 4916 4816
Timer A2 4B16 4A16
Timer A3 4D16 4C16
Timer A4 4F16 4E16
Toggle flip-flop
Fig. 11 Block diagram of timer A
15