Figure 3.4 2-Phase Decode ([Enxtncr]<P3En>=0) - Toshiba TXZ Series Reference Manual

32-bit risc microcontroller advanced encoder input circuit (32-bit)
Hide thumbs Also See for TXZ Series:
Table of Contents

Advertisement

(2) 2-phase decode ([ENxTNCR]<P3EN>=0)
In the case of [ENxINT]=0x00000002;
fsys
ENCxA(U)
ENCxB(V)
ENCxZ(W)
Rotation edge pulse ENCLK
DIR
Rotation direction
Count clear
ENCxTIMPLS
(2-division)
Counter
Interrupt INTENCx1
The hall sensor inputs (U, V, and W) are connected to ENCxA, ENCxB, and ENCxZ, respectively. When
<P3EN>=0, the frequency of 2-phase inputs (ENCxA and ENCxB) is multiplied by 4, and when <P3EN>=1, the
frequency of 3-phase inputs (ENCxA, ENCxB, and ENCxZ) is multiplied by 6. Then, the rotation edge pulses are
counted.
When the rotation is done in CW direction (ENCxA is 90 degrees ahead comparing with ENCxB), the counter
value increments. After the counter value matches the value "0xFFFFFFFF", the counter is cleared to "0" at the
next ENCLK.
When the rotation is done in CCW direction (ENCxA is 90 degrees late comparing with ENCxB), the counter
value decrements. After the counter value equals to "0x00000000", the counter value is set to the value
"0xFFFFFFFF" at the next ENCLK.
When [ENxTNCR]<ENCLR> is set to "1", the counter is cleared to "0".
When the rotation direction is detected as CW, [ENxSTS]<UD> is set to "1", and detected as CCW, set to "0".
<UD> is cleared to "0" when [ENxTNCR]<ENRUN>=0.
[ENxTNCR]<DECMD> can set the rotation direction to CW only or CCW only. When <DECMD> is not "00",
the rotation edge is detected by comparing the input state ([ENxINPMON]<DETMONA>, <DETMONB>, and
<DETMONZ>) stored at the previous edge detection with the current input values.
The signal dividing ENCLK (ENCxTIMPLS) is output.
When [ENxINTCR]<CMPIE>=1 and the counter value becomes [ENxINT] value, INTENCx1 interrupt can be
generated.
When [ENxINTCR]<MCMPIE>=1 and the counter value becomes [ENxMCMP] value, INTENCx1 interrupt can
be generated.
2018-10-11
CW direction
0xFFFF
0xFFFF
0xFFFF
0xFFFF
0x0000
FFFC
FFFD
FFFE
FFFF
0000
Figure 3.4 2-phase decode ([ENxTNCR]<P3EN>=0)
Advanced Encoder Input Circuit(32-bit)
0x0000
0x0000
0x0000
0x0000
0001
0002
0003
0002
16 / 55
CCW direction
0x0000
0x0000
0xFFFF
0xFFFF
0xFFFF
0001
0000
FFFF
FFFE
FFFD
TXZ Family
0xFFFF
0xFFFF
0xFFFF
FFFC
FFFB
FFFA
Rev. 1.1

Advertisement

Table of Contents
loading

Table of Contents