Timers’ functions for three-phase motor control
101
Mitsubishi microcomputers
M16C / 62N Group
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Figure 1.16.3. Registers related to timers for three-phase motor control
Symbol
Address
When reset
TA11
034316,034216
Indeterminate
TA21
034516,034416
Indeterminate
TA41
034716,034616
Indeterminate
b7
b0 b7
b0
(b15)
(b8)
W
R
Counts an internal count source
000016 to FFFF16
Function
Values that can be set
Timer Ai-1 register (Note)
Note: Read and write data in 16-bit units.
Symbol
Address
When reset
TA1
038916,038816
Indeterminate
TA2
038B16,038A16
Indeterminate
TA4
038F16,038E16
Indeterminate
TB2
039516,039416
Indeterminate
b7
b0
b7
b0
(b15)
(b8)
W
R
Timer mode
000016 to FFFF16
Counts an internal count source
Function
Values that can be set
One-shot timer mode
000016 to FFFF16
Counts a one shot width
(Note 2, 3)
Timer Ai register (Note 1)
TA1TGL
Symbol
Address
When reset
TRGSR
038316
0016
Timer A1 event/trigger
select bit
0 0 : Input on TA1IN is selected (Note)
0 1 : TB2 overflow is selected
1 0 : TA0 overflow is selected
1 1 : TA2 overflow is selected
Trigger select register
Bit name
Function
Bit symbol
b0
0 0 : Input on TA2IN is selected (Note)
0 1 : TB2 overflow is selected
1 0 : TA1 overflow is selected
1 1 : TA3 overflow is selected
0 0 : Input on TA3IN is selected (Note)
0 1 : TB2 overflow is selected
1 0 : TA2 overflow is selected
1 1 : TA4 overflow is selected
0 0 : Input on TA4IN is selected (Note)
0 1 : TB2 overflow is selected
1 0 : TA3 overflow is selected
1 1 : TA0 overflow is selected
Timer A2 event/trigger
select bit
Timer A3 event/trigger
select bit
Timer A4 event/trigger
select bit
W
R
TA1TGH
TA2TGL
TA2TGH
TA3TGL
TA3TGH
TA4TGL
TA4TGH
b1 b0
b3 b2
b5 b4
b7 b6
Note: Set the corresponding port direction register to “0”.
b7
b6
b5
b4 b3
b2
b1
Symbol
Address
When reset
TABSR
038016
0016
Count start flag
Bit name
Function
Bit symbol
W
R
b7 b6
b5
b4
b3
b2
b1 b0
Timer B2 count start flag
Timer B1 count start flag
Timer B0 count start flag
Timer A4 count start flag
Timer A3 count start flag
Timer A2 count start flag
Timer A1 count start flag
Timer A0 count start flag
0 : Stops counting
1 : Starts counting
TB2S
TB1S
TB0S
TA4S
TA3S
TA2S
TA1S
TA0S
Note 1: Read and write data in 16-bit units.
Note 2: When the timer Ai register is set to "000016", the counter does not operate
and a timer Ai interrupt does not occur.
Note 3: Use MOV instruction to write to this register.