Texas Instruments MSP430x4xx Family User Manual page 846

Hide thumbs Also See for MSP430x4xx Family:
Table of Contents

Advertisement

Scan IF Operation
Figure 30−20. Quadrature Decoding State Diagram
Table 30−8.Quadrature Decoding PSM Table
Previous
Quadrature
Pair
Pair
00
00
00
00
01
01
01
01
10
10
10
10
11
11
11
11
30-34
Scan IF
00
−1
+1
10
01
11
Correct State Transitions
To transfer the state encoding into counts it is necessary to decide what
fraction of the rotation should be counted and on what state transitions. In this
example only full rotations will be counted on the transition from state 00 to 01
or 10 using a 180° disk with the sensors 90° apart. All the possible state
transitions can be put into a table and this table can be translated into the
corresponding state table entries for the processing state machine as shown
in Table 30−8.
Current
Movement
Quadrature
Pair
Pair
00
No Rotation
01
Turns right, +1
10
Turns left, −1
11
Error
00
Turns left
01
No rotation
10
Error
11
Turns right
00
Turns right
01
Error
10
No rotation
11
Turns left
00
Error
01
Turns left
10
Turns right
11
No rotation
00
10
01
11
Erroneous State Transitions
State Table Entry
Q6
Q2
Q1
Error
−1
+1
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
Q3
Q0
Current
Byte
Quadrature
Code
Pair
0
0
000h
0
1
003h
1
0
00Ch
1
1
049h
0
0
000h
0
1
001h
1
0
048h
1
1
009h
0
0
000h
0
1
041h
1
0
008h
1
1
009h
0
0
040h
0
1
001h
1
0
008h
1
1
009h

Advertisement

Table of Contents
loading

Table of Contents