
Under
development
Preliminary Specifications REV.D
Specifications in this manual are tentative and subject to change.
Mitsubishi Microcomputers
M16C/80 group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timer A
93
Timer A
Figure 1.13.1 shows the block diagram of timer A. Figures 1.13.2 to 1.13.4 show the timer A-related registers.
Except in event counter mode, timers A0 through A4 all have the same function. Use the timer Ai mode
register (i = 0 to 4) bits 0 and 1 to choose the desired mode.
Timer A has the four operation modes listed as follows:
Timer mode: The timer counts an internal count source.
Event counter mode: The timer counts pulses from an external source or a timer over flow.
One-shot timer mode: The timer stops counting when the count reaches “0000
16”.
Pulse width modulation (PWM) mode: The timer outputs pulses of a given width.
Figure 1.13.2. Timer A-related registers (1)
Count start flag
(Address 034016)
Up count/down count
TAi
Addresses
TAj
TAk
Timer A0
034716
034616
Timer A4
Timer A1
034916
034816
Timer A0
Timer A2
034B16
034A16
Timer A1
Timer A3
034D16
034C16
Timer A2
Timer A4
034F16
034E16
Timer A3
Timer A0
Always down count except
in event counter mode
Reload register (16)
Counter (16)
Low-order
8 bits
High-order
8 bits
Clock source
selection
Timer
(gate function)
Timer
One shot
PWM
f1
f8
f32
External
trigger
TAiIN
(i = 0 to 4)
TB2 overflow
Event counter
fC32
Clock selection
TAj overflow
(j = i – 1. Note, however, that j = 4 when i = 0)
Pulse output
Toggle flip-flop
TAiOUT
(i = 0 to 4)
Data bus low-order bits
Data bus high-order bits
Up/down flag
Down count
(Address 034416)
TAk overflow
(k = i + 1. Note, however, that k = 0 when i = 4)
Polarity
selection
Timer Ai mode register
Symbol
Address
When reset
TAiMR(i=0 to 4)
035616 to 035A16 00000X002
Bit name
Function
Bit symbol
W
R
b7
b6
b5
b4
b3
b2
b1
b0
0 0 : Timer mode
0 1 : Event counter mode
1 0 : One-shot timer mode
1 1 : Pulse width modulation
(PWM) mode
b1 b0
TCK1
MR3
MR2
MR1
TMOD1
MR0
TMOD0
TCK0
Function varies with each operation mode
Count source select bit
(Function varies with each operation mode)
Operation mode select bit
This bit is invalid in M16C/80 series.
Port output control is set by the function select registers A and B.
– –
Figure 1.13.1. Block diagram of timer A