deveopmen
Timer A
Preliminary Specifications REV.D
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M16C/80 (100-pin version) group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
93
Item
Specification
Count source
Count operation
f
1
, f
8
, f
32
, fc
32
Down count
When the timer underflows, it reloads the reload register contents before
continuing counting
1/(n+1)
n : Set value
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 (Setting by corresponding port function
select register and peripheral function select register)
Count value can be read out by reading timer Ai register
When counting stopped
When a value is written to timer Ai register, it is written to both reload register
and counter
When counting in progress
When a value is written to timer Ai register, it is written to only reload register
(Transferred to counter at next reload time)
Gate function
Counting can be started and stopped by the TAi
IN
pin’s input signal
Pulse output function
Each time the timer underflows, the TAi
OUT
pin’s polarity is reversed
Divide ratio
Count start condition
Count stop condition
Interrupt request generation timing
TAi
IN
pin function
TAi
OUT
pin function
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.5
shows the timer Ai mode register in timer mode.
Table 1.13.1. Specifications of timer mode
Note 1: The bit can be “0” or “1”.
Note 2: Set the corresponding port function select register to I/O port, and port
direction register to “0”.
Timer Ai mode register
Symbol
TAiMR(i=0 to 4)
Address
When reset
0356
16
to 035A
16
00000X00
2
Bit name
Function
Bit symbol
W
R
AAA
b7
b6
b5
0
b4
b3
b2
b1
0 0
b0
Operation mode
select bit
0 0 : Timer mode
TMOD1
MR0
TMOD0
Gate function select bit
(Note 2)
: Gate function not available
(TAi
IN
pin is a normal port pin)
1 0 : Timer counts only when TA
iIN
pin is
held “L” (Note 2)
1 1 : Timer counts only when TA
iIN
pin is
held “H” (Note 2)
b4 b3
MR2
MR1
MR3
0 (Must always be fixed to “0” in timer mode)
0 0 : f
1
0 1 : f
8
1 0 : f
32
1 1 : f
C32
b7 b6
TCK1
TCK0
Count source select bit
AAA
AAA
AAA
AA
AAA
AA
AAA
AAA
AAA
AAA
This bit is invalid in M16C/80 series.
Port output control is set by the function select registers A and B.
Figure 1.13.5. Timer Ai mode register in timer mode