M37754 Mitsubishi, M37754 Datasheet - Page 23

no-image

M37754

Manufacturer Part Number
M37754
Description
SINGLE-CHIP 16BIT CMOS MICROCOMPUTER
Manufacturer
Mitsubishi
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
M37754S4CGP
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
TIMER
There are eight 16-bit timers. They are divided by type into timer A(5)
and timer B(3).
The timer I/O pins are multiplexed with I/O pins for port P5 and P6.
To use these pins as timer input pins, the data direction register bit
corresponding to the pin must be cleared to “0” to specify input mode.
TIMER A
Figure 17 shows a block diagram of timer A.
Timer A has four modes: timer mode, event counter mode, one-shot
pulse mode, and pulse width modulation mode. The mode is se-
lected with bits 0 and 1 of the timer Ai mode register (i = 0 to 4). Each
of these modes is described below.
Fig. 17 Block diagram of timer A
Note: Perform write and read to/from timer Ai register in the condition of 16-bit data length : data length flag (m) = “0”.
Clock source selection
Pf
Pf
Pf
Pf
2
16
64
512
(i = 0–4)
(i = 0–4)
TAi
TAi
OUT
IN
Pulse output
selection
Polarity
• Timer
• One-shot
• Pulse width modulation
Timer(gate function)
Event counter
External trigger
M37754M8C-XXXGP, M37754M8C-XXXHP
Toggle flip-flop
Count start bit
Up-down bit
(40
(44
Down count
16
16
)
)
(1) Timer mode [00]
Figure 18 shows the bit configuration of the timer Ai mode register
during timer mode. Bits 0 and 1 of the timer Ai mode register must be
“0” in timer mode. Bits 3, 4, and 5 are used to select the gate func-
tion. Bits 4 and 5 must be “0” when not selecting the gate function.
Bit 3 is ignored if bit 4 is “0”.
Bits 6 and 7 are used to select the timer counter source.
The counting of the selected clock starts when the count start bit is
“1” and stops when it is “0”.
Figure 19 shows the bit configuration of the count start bit. The
counter is decremented, an interrupt is caused and the interrupt re-
quest bit in the timer Ai interrupt control register is set when the con-
tents becomes 0000
register is transferred to the counter and count is continued.
When data is written to timer Ai register with timer Ai halted, the same
data is also written to the reload register and the counter. When data
is written to timer Ai which is busy, the data is written to the reload
register, but not to the counter. The new data is reloaded from the re-
load register to the counter at the next reload time and counting con-
tinues. The contents of the counter can be read at any time.
When the value set in the timer Ai register is n, the timer frequency
dividing ratio is 1/(n+1).
M37754S4CGP, M37754S4CHP
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Reload register(16)
Data bus (even)
Data bus (odd)
(Lower 8 bits)
Counter(16)
16
Always decremented
except in event count mode
. At the same time, the contents of the reload
MITSUBISHI MICROCOMPUTERS
Up/Down
(Higher 8 bits)
Timer A0 47
Timer A1 49
Timer A2 4B
Timer A3 4D
Timer A4 4F
A
ddresses
16
16
16
16
16
46
48
4E
4A
4C
16
16
16
16
16
23

Related parts for M37754