![](http://datasheet.mmic.net.cn/30000/M30245MC-XXXGP_datasheet_2358670/M30245MC-XXXGP_121.png)
M30245 Group
Timer A
Rev.2.00
Oct 16, 2006
page 119 of 264
REJ03B0005-0200
Item
Specification
Count source
f1, f8, f32, fc32
Count operation
The timer counts down
When the count reaches 000016, the timer stops counting after reloading a new count
If a trigger occurs when counting, the timer reloads a newcount and restarts counting
Divide ratio
1/n
n: Set value
Count start condition
An external trigger is input
The timer overflows
The one-shot flag is set (=1)
Count stop condition
A new count is reloaded after the count has reached 000016
The count start flag is reset (=0)
Interrupt request
generation timing
The count reaches 000016
TAiIN pin function
Programmable I/O port or trigger input.
TAiOUT pin function
Programmable I/O port or pulse output.
Read from timer
When Timer Ai register is read, the value is indeterminate.
Write to timer
When counting has stopped and a value is written to Timer Ai, it is also written to the reload
register and counter.
When counting is in progress and a value is written to Timer Ai, it is written to only the reload
register (Transferred to the counter at next reload time)
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
1 0 : One shot timer mode
b1 b0
MR0
Pulse output function
select bit
External trigger
select bit (Note 1)
0 : Falling edge of TAiIN input signal (Note 2)
1 : Rising edge of TAiIN input signal (Note 2)
MR3
TCK0
TCK1
0 (Set to "0" in one-shot timer mode)
Note 1: Valid only when the TAiIN pin is selected by the event trigger select bit
(addresses 0382
16, 038316).
Note 2: Set the corresponding port direction register to "0".
MR1
MR2
Trigger select bit
0 : One-shot start flag is valid
1 : Selected by event/trigger select register
O O
Count operation type
select bit
b7 b6
0 0 : f1
0 1 : f8
1 0 : f32
1 1 : fc32
0 : Pulse is not output
(TAiOUTpin is a normal port pin)
1 : Pulse is output
(TAiOUTpin is a pulse output pin)
O O
One-shot timer mode
In this mode, the timer operates only once. Table 1.42 shows the timer specifications for Timer A in one-shot timer
mode. When a trigger occurs, the timer starts counting down until it reaches 000016. Figure 1.84 shows the Timer Ai
mode register in one-shot timer mode.
Table 1.42. Timer specifications in one-shot timer mode
Figure 1.84. Timer Ai mode register in one-shot timer mode