M16C/62P Group (M16C/62P, M16C/62PT)
16. Three-Phase Motor Control Timer Function
Rev.2.41
Jan 10, 2006
Page 174 of 390
REJ09B0185-0241
The three-phase motor control timer function is enabled by setting the INV02 bit in the INVC0 register to “1”. When
this function is on, timer B2 is used to control the carrier wave, and timers A4, A1 and A2 are used to control three-
phase PWM outputs (U, U, V, V, W and W). The dead time is controlled by a dedicated dead time timer. Figure 16.9
shows the example of Triangular Wave Modulation Operation and Figure 16.10 shows the example of Sawtooth Wave
Modulation Operation.
Figure 16.9
Triangular Wave Modulation Operation
Triangular Wave
Signal Wave
INV00, INV01: Bits in the INVC0 register
INV11, INV14: Bits in the INVC1 register
NOTES:
1. Internal signals. See
Figure 16.1 Three-phase Motor Control Timer Functions Block Diagram
.
2. Applies only when the INV11 bit is set to 1 (three-phase mode).
(a) When INV11=1 (three-phase mode 1)
- INV01=0 and ICTB2=2h (Timer B2 interrupt is
generated with every second Timer B2 underflow) or
INV01=1, INV00=1and ICTB2=1h (Timer B2 interrupt is
generated on the falling edge of Timer A reload control
signal)
- Default value of the timer: TA41=m, TA4=m
The TA4 and TA41 registers are changed whenever
Timer B2 interrupt is generated.
First time: TA41=n, TA4:=n.
Second time: TA41=p, TA4=p.
- Default value of the IDB0 and IDB1 registers
DU0=1, DUB0=0, DU1=0, DUB1=1
They are changed to DU0=1, DUB0=0, DU1=1, DUB1=0
by the third Timer B2 interrupt.
TB2S Bit in
TABSR Register
Timer B2
Timer A1
Reload Control Signal
(1)
Timer A4
One-Shot Pulse
(1)
U-Phase Output
Signal
(1)
U-Phase Output
Signal
(1)
U-Phase
U-Phase
INV14 = 0
(“L” active)
U-Phase
U-Phase
INV14 = 1
(“H” active)
m
m
n
n
p
p
(b) When INV11=0 (three-phase mode 0)
- INV01=0, ICTB2=1h (Timer B2 interrupt is generated
whenever Timer B2 underflows)
- Default value of the timer: TA4=m
The TA4 register is changed whenever Timer B2
interrupt is generated.
First time: TA4=m. Second time: TA4=n.
Third time: TA4=n. Fourth time: TA=p.
Fifth time: TA4=p.
- Default value of the IDB0 and IDB1 registers:
DU0=1, DUB0=0, DU1=0, DUB1=1
They are changed to DU0=1, DUB0=0, DU1=1, DUB1=0
by the sixth Timer B2 interrupt.
The above applies to INVC0 = 00XX11XXb and INVC1 = 010XXXX0b (X varies depending on each system.)
Examples of PWM output change are
q
q
p
q
p
q
m
m
n
m
n
m
n
n
n
p
p
q
Timer A4
Start Trigger Signal
(1)
TA4 Register
(2)
TA4-1 Register
(2)
Reload Register
(2)
r
r
q
Dead time
Dead time
Rewrite the IDB0 and IDB1 registers
Transfer a counter
value to the three-
phase shift register
Triangular Waveform as a Carrier Wave
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655