English
Language : 

M16C Datasheet, PDF (105/262 Pages) Mitsubishi Electric Semiconductor – SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Preliminary Specifications REV.B
Specifications in this manual are tentative and subject to change.
Mitsubishi microcomputers
M16C / 6N Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Timers’ functions for three-phase motor control
Triangular wave modulation
To generate a PWM waveform of triangular wave modulation, set “0” in the modulation mode select bit (bit 6)
of three-phase PWM control register 0 (01C816). Also, set “1” in the timers A4-1, A1-1, A2-1 control bit (bit
1) of three-phase PWM control register 1 (01C916). In this mode, each of timers A4, A1, and A2 has two
timer registers, and alternately reloads the timer register’s content to the counter every time timer B2
counter’s content becomes 000016. If “1” is set to the effective interrupt output specification bit (bit 1) of
three-phase PWM control register 0 (01C816), the frequency of interrupt requests that occur every time the
timer B2 counter’s value becomes 000016 can be set by use of the timer B2 counter (01CD16) for setting the
frequency of interrupt occurrences. The frequency of occurrences is given by (setting; setting p 0).
Setting “1” in the effective interrupt output specification bit (bit 1) of three-phase PWM control register 0
provides the means to choose which value of the timer A1 reload control signal to use, “0” or “1”, to cause
timer B2’s interrupt request to occur. To make this selection, use the effective interrupt output polarity
selection bit (bit 0) of three-phase PWM control register 0 (01C816).
An example of U phase waveform is shown in Figure 11-6, and the description of waveform output workings
is given below. Set “1” in bit 0 (DU0) of three-phase output buffer register 0 (01CA16). and set “0” in bit 1
(DUB0) of the same register. In addition, set “0” in bit 0 (DU1) of three-phase output buffer register 1
(01CB16) and set “1” in bit 1 (DUB1) of the same register. Also, set “0” in the effective interrupt output
specification bit (bit 1) of three-phase PWM control register 0 to set a value in the timer B2 interrupt
occurence frequency set counter. By this setting, a timer B2 interrupt occurs when the timer B2 counter’s
content becomes 000016 as many as (setting) times. Furthermore, set “1” in the effective interrupt output
specification bit (bit 1) of three-phase PWM control register 0, set in the effective interrupt polarity select bit
(bit 0) of three-phase PWM control register 0 and set "1" in the interrupt occurence frequency set counter
(01CD16). These settings cause a timer B2 interrupt to occur every other interval when the U phase output
goes to “H”.
When the timer B2 counter’s content becomes 000016, timer A4 starts outputting one-shot pulses. In this
instance, the content of the three-phase buffer register DU1 and that of DU0 are set in the three-phase
output shift register (U phase), the content of DUB1 and that of DUB0 are set in the three-phase shift register
(U phase). After triangular wave modulation mode is selected, however, no setting is made in the shift
register even though the timer B2 counter’s content becomes 000016.
The value of DU0 and that of DUB0 are output to the U terminal (P80) and to the U terminal (P81) respec-
tively. When the timer A4 counter counts the value written to timer A4 (038F16, 038E16) and when timer A4
finishes outputting one-shot pulses, the three-phase shift register’s content is shifted one position, and the
value of DU1 and that of DUB1 are output to the U phase output signal and to U phase output signal
respectively. At the same time, one-shot pulses are output from the timer for setting dead time used for
setting the time over which the “L” level of the U phase waveform doesn’t lap over the “L” level of the U phase
waveform, which has the opposite phase of the former. The U phase waveform output that started from the
“H” level keeps its level until the timer for setting dead time finishes outputting one-shot pulses even though
the three-phase output shift register’s content changes from “1” to “0” by the effect of the one-shot pulses.
When the timer for setting dead time finishes outputting one-shot pulses, "0" already shifted in the three-
phase shift register goes effective, and the U phase waveform changes to the "L" level. When the timer B2
counter’s content becomes 000016, the timer A4 counter starts counting the value written to timer A4-1
(01C116, 01C016), and starts outputting one-shot pulses. When timer A4 finishes outputting one-shot
pulses, the three-phase shift register’s content is shifted one position, but if the three-phase output shift
register’s content changes from “0” to “1” as a result of the shift, the output level changes from “L” to “H”
without waiting for the timer for setting dead time to finish outputting one-shot pulses. A U phase waveform
105