![](http://datasheet.mmic.net.cn/30000/M30245MC-XXXGP_datasheet_2358670/M30245MC-XXXGP_120.png)
M30245 Group
Timer A
Rev.2.00
Oct 16, 2006
page 118 of 264
REJ03B0005-0200
Figure 1.82. Timer Ai mode register in event counter mode (not using two-phase processing)
Bit Symbol
Bit Name
Function
R W
TMOD0
Operation mode
select bit
Symbol
TAiMR (i=0 to 4)
Address
0396
16 to 039A16
When reset
00000X00
2
Timer Ai mode register (i = 0 to 4)
b7
b5
b6
b4
b3
b2
b1
b0
O O
TMOD1
O O
0 1 : Event counter mode (Note 1)
b1 b0
MR0
Two-phase pulse signal
processing operation
select bit (Note 4)
Pulse output function
select bit
Count polarity select bit
(Note 2)
0 : Counts external signals falling edges
1 : Counts external signals rising edges
0 (Set to "0" when not using two-phase
pulse signal processing)
MR3
TCK0
TCK1
0 (Set to "0" in event counter mode)
Note 1: Count source is selected by the event/trigger select bit (addresses 0382
16, 038316) in
event counter mode.
Note 2: This bit is valid only when counting an external signal.
Note 3: Set the corresponding port direction register to "0".
Note 4: This bit is valid for Timer A3 mode registers. Timer A2 is fixed to normal processing
operation and Timer A4 is fixed to multiply-by-4 processing operation.
MR1
MR2
Up/down switching
cause select bit
0 : Up/down flag data
1 : TAiOUT pin's input signal (Note 3)
O O
Count operation type
select bit
0 : Reload type
1 : Free-run type
0 : Pulse is not output
(TAiOUT pin is a normal port pin)
1 : Pulse is output
(TAiOUT pin is a pulse output pin)
O O
Bit Symbol
Bit Name
Function
R W
TMOD0
Operation mode
select bit
Symbol
TAiMR (i=0 to 4)
Address
0396
16 to 039A16
When reset
00000X00
2
Timer Ai mode register (i = 0 to 4)
b7
b5
b6
b4
b3
b2
b1
b0
O O
TMOD1
O O
0 1 : Event counter mode (Note 1)
b1 b0
MR0
Two-phase pulse signal
processing operation
select bit (Notes 3, 4)
Pulse output function
select bit
Count polarity select bit
(Note 2)
0 (Set to "0" when using two-phase
pulse signal processing)
0 : Normal processing operation
1 : Multiply-by-4 operation
MR3
TCK0
TCK1
0 (Set to "0" in event counter mode)
Note 1: Count source is selected by the event/trigger select bit (addresses 0382
16, 038316) in
event counter mode.
Note 2: This bit is valid only when counting an external signal.
Note 3: This bit is valid for Timer A3 mode registers. Timer A2 is fixed to normal processing
operation and Timer A4 is fixed to multiply-by-4 processing operation.
Note 4: When performing two-phase pulse signal processing, make sure the two-phase pulse
signal processing operation select bit (address 0384
16) is set to "1". Also be sure to
always set the event/trigger select bit (address 0383
16) to "00".
MR1
MR2
Up/down switching
cause select bit
0 (Set to "1" when using two-phase
pulse signal processing)
O O
Count operation type
select bit
0 : Reload type
1 : Free-run type
O O
0 (Set to "0" when using two-phase
pulse signal processing)
Figure 1.83. Timer Ai mode register in event counter mode (using two-phase processing)