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

no-image

M30240ECFP

Manufacturer Part Number
M30240ECFP
Description
M30240 Group Specification
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Specifications in this manual are tentative and subject to change
Timer A
Table 1.21:
Figure 1.67: Timer Ai mode register in pulse-width modulation mode
Count source
Count operation
16-bit PWM
8-bit PWM
Count start condition
Count stop condition
Interrupt request
generation timing
TAiIN pin function
TAiOUT pin function
Read from timer
Write to timer
2.21.4 Pulse-width modulation (PWM) mode
In this mode, the timer outputs pulses of a given width in succession (See Table 1.21 ). In this mode,
the counter functions as either a 16-bit pulse-width modulator or an 8-bit pulse-width modulator. Figure
1.67 shows the timer Ai mode register in pulse-width modulation mode.Figure 1.68 shows the example
of how a 16-bit pulse-width modulator operates. Figure 1.69 shows the example of how an 8-bit pulse
width modulator operates.
Item
Timer specifications in pulse-width modulation mode
Timer Ai mode register
b7
b6
b5
f1, f8, f32
•The timer counts down (operating as an 8-bit or a 16-bit pulse-width modulator)
•The timer reloads a new count at a rising edge of PWM pulse and continues counting
• The timer is not affected by a trigger that occurs when counting
•High level width n / f
•Cycle time (216-1) / f
•High level width
•Cycle time
•External trigger is input
•The timer overflows
•The count start flag is set (= 1)
•The count start flag is reset (= 0)
PWM pulse goes “L”
Programmable I/O port or trigger input
Pulse output
When timer Ai register is read, it indicates an indeterminate value
•When counting is stopped and a value is written to timer Ai register, it is written to both
reload register and the counter
•When counting in progress and a value is written to timer A register, it is written to only
reload register to be transferred to the counter at next reload timer.
b4
b3
Note 1: Valid only when the TAi
Note 2: Set the corresponding port direction register to “0”.
1
b2
1 1
b1
(addresses 0382
b0
Bit symbol
TMOD0
TMOD1
TCK0
MR0
MR1
MR2
MR3
TCK1
Symbol
TAiMR(i=0 to 4)
(28-1)
n
16
Trigger select bit
16/8 PWM mode select bit
Count source select bit
Must always be "1" in PWM mode)
External trigger select bit
(Note 1)
Operation mode
select bit
i
and 0383
i
(m+1) /f
(m+1) /f
IN
n: Set value
0396
Bit name
pin is selected by the event/trigger select bit.
16
Address
16
). If timer overflow is selected, this bit can be "1", or "0".
to 039A
1-78
i
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
i
fixed
n: values set to timer Ai register’s high-order address
16
m: values set to timer Ai register’s low-order address
When reset
1 1 : PWM mode
0 : Functions as a 16-bit pulse width modulator
1 : Functions as an 8-bit pulse width modulator
b1 b0
0 : Falling edge of TAi
1 : Rising edge of TAi
0 : Count strat flig is valid
1 : Selected by event /trigger select register
b7 b6
0 0 : f
0 1 : f
1 0 : f
1 1 : Reserved
Specification
00
16
1
8
32
(Note 2)
(Note 2)
Function
IN
IN
pin's input signal
pin's input signal
Mitsubishi microcomputers
M30240 Group
R
W

Related parts for M30240ECFP