M16C/62P Group (M16C/62P, M16C/62PT)
16. Three-Phase Motor Control Timer Function
Rev.2.41
Jan 10, 2006
Page 169 of 390
REJ09B0185-0241
Figure 16.4
ICTB2, TA1, TA2, TA4, TA11, TA21 and TA41 Registers
Timer B2 Interrupt Generation Frequency Set Counter
(1, 2, 3)
Symbol
After Reset
ICTB2
Indeterminate
Setting Range
RW
NOTES :
1.
2.
3. If the INV00 bit is set to “1”, the first interrupt is generated w hen Timer B2 underflow s n-1 times,
n
being the value set
in the ICTB2 counter. Subsequent interrupts are generated every
n
times Timer B2 underflow s.
Address
034Dh
Use the MOV instruction to set the ICTB2 register.
WO
When the INV01 bit is set to “0” (the ICTB2 counter increments w henever
Timer B2 underflow s) and the setting value is
n
, Timer B2 interrupt is
generated every
n
th time Timer B2 underflow occurs.
When the INV01 bit is set to “1” (the INV00 bit selects count timing of the
ICTB2 counter) and setting value is
n
, Timer B2 interrupt is generated
every
n
th time Timer B2 underflow meeting the condition selected in the
INV00 bit occurs.
b0
b7
Function
1 to 15
If the INV01 bit is set to “1”, set the ICTB2 register w hen the TB2S bit is set to “0” (Timer B2 counter stopped).
If the INV01 bit is set to “0” and the TB2S bit to “1” (Timer B2 counter start), do not set the ICTB2 register w hen Timer
B2 underflow s.
—
Nothing is assigned. When w rite, set to “0”.
Timer Ai, Ai-1 Register (i = 1, 2, 4)
(1, 2, 3, 4, 5, 6, 7)
Symbol
Address
After Reset
TA1, TA2
0389h to 0388h, 038Bh to 038Ah
Indeterminate
TA4
038Fh to 038Eh
Indeterminate
TA11, TA21 0343h to 0342h, 0345h to 0344h
Indeterminate
TA41
0347h to 0346h
Indeterminate
Setting Range
RW
NOTES :
1.
2
3
4
5
6
7
WO
0000h to FFFFh
Function
If setting value is
n
, the timer stops w hen the
n
th count source is
counted after a start trigger is generated.
Positive phase changes to negative phase, and vice versa, w hen
Timers A1, A2 and A4 stop.
b7
b0
(b15)
b7
Follow the procedure below to set the TAi1 register.
(a) Write value to the TAi1 register,
(b) Wait one Timer Ai count source cycle, and
(c) Write the same value as (a) to the TAi1 register.
When the INV11 bit is set to “0” (three-phase mode 0), the value of the TAi register is transferred to the reload
register by a Timer Ai start trigger.
When the INV11 bit is set to “1” (three-phase mode 1), the value of the TAi1 register is first transferred to the
reload register by a Timer Ai start trigger. Then, the value of the TAi register is transferred by the next trigger. The
values of the TAi1 and TAi registers are transferred alternately to the reload register w ith every Timer Ai start
trigger.
When the INV15 bit in the INVC1 register is set to “0” (dead timer enabled), phase sw itches from an inactive level to
an active level w hen the dead time timer stops.
Do not w rite to these registers w hen the Timer B2 underflow s.
(b8)
b0
Use a 16-bit data for read and w rite.
If the TAi or TAi1 register is set to “0000h”, no counters start and no Timer Ai interrupt is generated.
Use the MOV instruction to set the TAi and TAi1 registers.
http://www.xinpian.net
提供单片机解密、IC解密、芯片解密业务
010-62245566 13810019655