Mitsubishi microcomputers
M16C / 62A Group
Timer A
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer Ai mode register
(When not using two-phase pulse signal processing)
b7
b6
b5
b4
b3
b2
b1
b0
0
0 1
Symbol
Address
When reset
TAiMR(i = 2 to 4) 0398
16
to 039A
16
00
16
Bit symbol
TMOD0
TMOD1
MR0
Bit name
Operation mode select bit
Pulse output function
select bit
b1 b0
Function
0 1 : Event counter mode
0 : Pulse is not output
(TAi
OUT
pin is a normal port pin)
1 : Pulse is output (Note 1)
(TAi
OUT
pin is a pulse output pin)
0 : Counts external signal's falling edges
1 : Counts external signal's rising edges
0 : Up/down flag's content
1 : TA
iOUT
pin's input signal (Note 3)
R W
MR1
MR2
MR3
TCK0
TCK1
Count polarity
select bit (Note 2)
Up/down switching
cause select bit
0 : (Must always be 鈥?鈥?in event counter mode)
Count operation type
select bit
Two-phase pulse signal
processing operation
select bit (Note 4)(Note 5)
0 : Reload type
1 : Free-run type
0 : Normal processing operation
1 : Multiply-by-4 processing operation
Note 1: The settings of the corresponding port register and port direction register are invalid.
Note 2: This bit is valid when only counting an external signal.
Note 3: Set the corresponding port direction register to 鈥?鈥?
Note 4: This bit is valid for the timer A3 mode register.
For timer A2 and A4 mode registers, this bit can be 鈥? 鈥漮r 鈥?鈥?
Note 5: When performing two-phase pulse signal processing, make sure the two-phase pulse
signal processing operation select bit (address 0384
16
) is set to 鈥?鈥? Also, always be
sure to set the event/trigger select bit (addresses 0382
16
and 0383
16
) to 鈥?0鈥?
Timer Ai mode register
(When using two-phase pulse signal processing)
b7
b6
b5
b4
b3
b2
b1
b0
0 1 0 0 0 1
Symbol
Address
When reset
TAiMR(i = 2 to 4) 0398
16
to 039A
16
00
16
Bit symbol
TMOD0
TMOD1
MR0
MR1
MR2
MR3
TCK0
TCK1
Bit name
Operation mode select bit
b1 b0
Function
0 1 : Event counter mode
RW
0 (Must always be 鈥?鈥?when using two-phase pulse signal
processing)
0 (Must always be 鈥?鈥?when using two-phase pulse signal
processing)
1 (Must always be 鈥?鈥?when using two-phase pulse signal
processing)
0 (Must always be 鈥?鈥?when using two-phase pulse signal
processing)
Count operation type
select bit
Two-phase pulse
processing operation
select bit (Note 1)(Note 2)
0 : Reload type
1 : Free-run type
0 : Normal processing operation
1 : Multiply-by-4 processing operation
Note 1: This bit is valid for timer A3 mode register.
For timer A2 and A4 mode registers, this bit can be 鈥?鈥?or 鈥?鈥?
Note 2: When performing two-phase pulse signal processing, make sure the two-phase pulse
signal processing operation select bit (address 0384
16
) is set to 鈥?鈥? Also, always be
sure to set the event/trigger select bit (addresses 0382
16
and 0383
16
) to 鈥?0鈥?
Figure 1.14.9. Timer Ai mode register in event counter mode
84