M30621ECGP MITSUBISHI [Mitsubishi Electric Semiconductor], M30621ECGP Datasheet - Page 73

no-image

M30621ECGP

Manufacturer Part Number
M30621ECGP
Description
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Timer A
Table 1.13.1. Specifications of timer mode
Note: Timer A1 and A2 do not have I/O port (TAi
Figure 1.13.7. Timer Ai mode register in timer mode
Count source
Count operation
Divide ratio
Count start condition
Count stop condition
Interrupt request generation timing
TAi
TAi
Read from timer
Write to timer
Select function
(1) Timer mode
In this mode, the timer counts an internally generated count source. (See Table 1.13.1.) Figure 1.13.7
shows the timer Ai mode register in timer mode.
IN
OUT
pin function
pin function
Item
Timer Ai mode register
b7
b6
b5
0
b4
b3
b2
0 0
b1
f
• Down count
• When the timer underflows, it reloads the reload register contents before continuing counting
1/(n+1)
Count start flag is set (= 1)
Count start flag is reset (= 0)
When the timer underflows
Programmable I/O port or gate input
Programmable I/O port or pulse output
Count value can be read out by reading timer Ai register
• When counting stopped
• When counting in progress
• Gate function
• Pulse output function
1
b0
, f
When a value is written to timer Ai register, it is written to both reload register and counter
When a value is written to timer Ai register, it is written to only reload register
(Transferred to counter at next reload time)
Counting can be started and stopped by the TAi
Each time the timer underflows, the TAi
Note 1: The settings of the corresponding port register and port direction register
Note 2: The bit can be “0” or “1”.
Note 3: Set the corresponding port direction register to “0”.
Note 4: Set these bits "0" in timer A1 and A2 mode registers.
8
, f
Bit symbol
TMOD0
TMOD1
32
TCK0
TCK1
MR0
MR1
MR2
MR3
Symbol
TAiMR(i=0 to 4)
, f
are invalid.
C32
n : Set value
Operation mode
select bit
Pulse output function
select bit
Gate function select bit
0 (Must always be fixed to “0” in timer mode)
Count source select bit
IN
0396
Bit name
and TAi
Address
16
to 039A
(Note 4)
(Note 4)
Specification
OUT
16
).
When reset
0 0 : Timer mode
b7 b6
0 : Pulse is not output
1 : Pulse is output (Note 1)
b4 b3
0 X
1 0 : Timer counts only when TA
1 1 : Timer counts only when TA
0 0 : f
0 1 : f
1 0 : f
1 1 : f
b1 b0
00
(TA
(TA
(Note 2)
held “L” (Note 3)
held “H” (Note 3)
16
1
8
32
C32
iOUT
iOUT
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
OUT
: Gate function not available
pin is a normal port pin)
pin is a pulse output pin)
(TAi
pin’s polarity is reversed
Function
IN
pin is a normal port pin)
IN
M16C / 62 Group (80-pin)
pin’s input signal
iIN
iIN
pin is
pin is
Mitsubishi microcomputers
R
W
73

Related parts for M30621ECGP