M30240ECFP MITSUBISHI [Mitsubishi Electric Semiconductor], M30240ECFP Datasheet - Page 69

no-image

M30240ECFP

Manufacturer Part Number
M30240ECFP
Description
M30240 Group Specification
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Preliminary Specifications REV. E
Specifications in this manual are tentative and subject to change
Timer A
2.21 Timer A
Figure 1.59: Block diagram of Timer A
Figure 1.60: Timer A related Registers (1)
Figure 1.59, Figure 1.60,Figure 1.61, and Figure 1.62 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
• Pulse width modulation (PWM) mode: The timer outputs pulses of a given width.
Timer Ai mode register
TB2 overflow
TAj overflow
(j = i – 1. Note, however, that j = 4 when i = 0)
TAk overflow
(k = i + 1. Note, however, that k = 0 when i = 4)
b7
TAi
(i = 0 to 4)
TAi
(i = 0 to 4)
f
f
f
b6
1
8
32
IN
OUT
Clock source
selection
b5
selection
Polarity
b4
b3
Pulse output
b2
b1
b0
• Timer
• One shot
• PWM
• Timer
• Event counter
Clock selection
(gate function)
Bit symbol
TMOD0
TMOD1
MR0
MR1
MR2
MR3
TCK0
TCK1
Symbol
TAiMR(i=0 to 4)
External
trigger
Operation mode
select bit
Count source select bit
Function varies with each operation mode
Function varies with each operation mode
(Address 0384
1-69
Up/down flag
(Address 0380
Count start flag
0396
Bit name
Down count
Toggle flip-flop
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Address
16
16
to 039A
)
16
Data bus high-order bits
)
Data bus low-order bits
16
Reload register (16)
b1 b0
0 0 : Timer mode
0 1 : Event counter mode
1 0 : One-shot timer mode
1 1 : Pulse width modulation (PWM) mode
Low-order
8 bits
When reset
Counter (16)
00
Timer A0 0387
Timer A1 0389
Timer A2 038B
Timer A3 038D
Timer A4 038F
16
TAi
Up count/down count
Always down count except
in event counter mode
Addresses
16
16
16
16
Function
16
High-order
8 bits
0386
0388
038A
038C
038E
Mitsubishi microcomputers
16
16
16
16
16
M30240 Group
Timer A4
Timer A0
Timer A1
Timer A2
Timer A3
TAj
16
Timer A1
Timer A2
Timer A3
Timer A4
Timer A0
”.
TAk
R
W

Related parts for M30240ECFP