M16C/62P Group (M16C/62P, M16C/62PT)
16. Three-Phase Motor Control Timer Function
Rev.2.41
Jan 10, 2006
Page 167 of 390
REJ09B0185-0241
Figure 16.2
INVC0 Register
Three-Phase Control Register 0
(1)
Symbol
Address
After Reset
INVC0
0348h
00h
Bit Symbol
Bit Name
RW
NOTES :
1.
2.
3.
4.
5.
6.
7.
8.
INV06=1
Sawtooth wav e modulation mode
Transf erred ev ery time a transf er trigger
is generated
By a transf er trigger, or the f alling edge of
a one-shot pulse of the timer A1, A2 or A4
Disabled
9.
b7 b6 b5 b4 b3 b2 b1 b0
INV03
Output Control Bit
(5, 6)
RW
INV02
Mode Select Bit
(4, 5)
RW
0 : Disables three-phase control timer output
1 : Enables three-phase control timer output
INV04
Positiv e and Negativ e-Phases
Concurrent Activ e Disable
Function Enable Bit
RW
0 : Enables concurrent active output
1 : Disables concurrent active output
INV05
Positiv e and Negativ e-Phases
Concurrent Activ e Output Detect
Flag
(7)
RW
0 : Not detected
1 : Detected
0 : Triangular w ave modulation mode
1 : Saw tooth w ave modulation mode
INV07
Softw are Trigger Select
RW
Transf er trigger is generated when the INV07 bit is set to “1”.
Trigger to the dead time timer is also generated when setting
the INV06 bit to “1”. Its v alue is “0” when read.
INV06
Modulation Mode
Select
(8, 9)
When the INV06 bit is set to “1”, set the INV11 bit to “0” (three-phase mode 0) and the PWCON bit in the TB2SC register to “0” (reload
Timer B2 with Timer B2 underf low).
Set the INV02 bit to “1” to operate the dead time timer, U-, V-and W-phase output control circuits and ICTB2 counter.
When the INVC03 bit is set to “1”, the pins applied to U/V/W output three-phase PWM.
The INV03 bit is set to “0” when the f ollowings conditions are all met.
• Reset
• A concurrent activ e state occurs while INV04 bit is set to “1”
• The INV03 bit is set to “0” by program
The INV05 bit can not be set to “1” by program. Set the INV04 bit to “0”, as well, when setting the INV05 bit to “0”.
Item
INV06=0
Mode
The f ollowing table describes how the INV06 bit works.
The U, U
__
, V, V
__
, W and W
___
pins, including pins shared with other output f unctions, are all placed in high-impedance states
Set the INV01 bit to “1” af ter setting the ICTB2 register.
The INV00 and INV01 bits are enabled only when the INV11 bit is set to “1” (three-phase mode 1). The ICTB2 counter is incremented by
one ev ery time Timer B2 underf lows, regardless of INV00 and INV01 bit settings, when the INV11 bit is set to “0” (three-phase mode).
When setting the INV01 bit to “1”, set Timer A1 count start f lag bef ore the f irst Timer B2 underf low.
When the INV00 bit is set to “1”, the f irst interrupt is generated when Timer B2 underf lows
n
-1 times, if
n
is the v alue set in the ICTB2
counter. Subsequent interrupts are generated ev ery n times Timer B2 underf lows.
Interrupt Enable Output
Polarity Select Bit
(3)
Interrupt Enable Output
Specification Bit
(2, 3)
Set the INVC0 register af ter the PRC1 bit in the PRCR register is set to “1” (write enable).
Rewrite the INV00 to INV02 and INV06 bits when Timers A1, A2, A4 and B2 stop.
INV01
RW
INV00
RW
RW
Function
0 : The ICTB2 counter is incremented by one on the
rising edge of Timer A1 reload control signal
1 : The ICTB2 counter is incremented by one on the
f alling edge of Timer A1 reload control signal
0 : ICTB2 counter is incremented by one when Timer B2
underf lows
1 : Selected by the INV00 bit
0 : No three-phase control timer functions
1 : Three-phase control timer function
Transf er trigger : Timer B2 underf lows and write to the INV07 bit, or write to the TB2 register when INV10 = 1
Triangular wav e modulation mode
Timing to Transf er f rom the IDB0
and IDB1 Registers to Three Phase
Output Shif t Register
Transf erred once by generating a transf er trigger
af ter setting the IDB0 and IDB1 registers
Timing to Trigger the Dead Time
Timer when the INV16 Bit=0
On the f alling edge of a one-shot pulse of the timer
A1, A2 or A4
when the f ollowing conditions are all met.
• The INV02 bit is set to “1” (three-phase control timer f unction)
• The INV03 bit is set to “0” (three-phase control timer output disabled)
• Direction registers of each port are set to “0” (input mode)
When both the INVC04 and INVC05 bits are set to “1”, the INVC03 bit is set to “0”.
INV13 Bit
Enabled when the INV11 bit=1 and the INV06 bit=0
• A signal applied to the NMI
_____
pin changes “H” to “L”
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655