English
Language : 

M30222 Datasheet, PDF (74/237 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
deUvnedloepr ment
MITSUBISHI MICROCOMPUTERS
Specifications in this manual are tentative and subject to change
M30222 Group
Rev. G
Timer A
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer Ai mode register
b7 b6 b5 b4 b3 b2 b1 b0
0
00
Symbol
TAiMR(i=0 to 4)
Address
039616 to 039A16
When reset
0016
Bit symbol
Bit name
Function
RW
TMOD0
TMOD1
MR0
MR1
MR2
Operation mode
select bit
Pulse output function
select bit
Gate function select bit
b1 b0
0 0 : Timer mode
0 : Pulse is not output
(TAiOUT pin is a normal port pin)
1 : Pulse is output (Note 1)
(TA iOUT pin is a pulse output pin)
b4 b3
0 X (Note 2): Gate function not available
(TAiIN pin is a normal port pin)
1 0 : Timer counts only when TAiIN pin is
held “L” (Note 3)
1 1 : Timer counts only when TAiIN pin is
held “H” (Note 3)
MR3
TCK0
TCK1
0 (Must always be fixed to “0” in timer mode)
Count source select bit
b7 b6
0 0 : f1
0 1 : f8
1 0 : f32
1 1 : fC32
Note 1: The settings of the corresponding port register and port direction register
are invalid.
Note 2: The bit can be "0" or "1".
Note 3: Set the corresponding port direction register to "0".
Fig. 1.51. Timer Ai mode register in timer mode
(2) Event counter mode
In this mode, the timer counts an external signal or an internal timer’s overflow. Timers A0 and A1 can
count a single-phase external signal. Timers A2, A3, and A4 can count a single-phase and a two-phase
external signal. Table 1.26 lists timer specifications when counting a single-phase external signal.
Figure 1.52 shows the Timer Ai mode register in event counter mode. Table 1.27 lists timer specifica-
tions when counting a two-phase external signal. Figure 1.53 shows the Timer Ai mode register in event
counter mode.
Usage Precautions
(1) Reading the Timer Ai register while a count is in progress allows reading, with arbitrary timing, the value
of the counter. Reading the Timer Ai register with the reload timing gets “FFFF16” by underflow or “000016” by
overflow. Reading the Timer Ai register after setting a value in the Timer Ai register with a count halted but
before the counter starts counting gets a proper value.
(2) When stop counting in free run type, set timer again.
1-75