Scan IF Operation
30-34
Scan IF
Figure 30−20. Quadrature Decoding State Diagram
00
10
11
01
00
10
11
01
Correct State Transitions
Erroneous State Transitions
+1
−1
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.
Table 30−8.Quadrature Decoding PSM Table
Previous
Current
Movement
State Table Entry
Quadrature
Pair
Quadrature
Pair
Q6
Q2
Q1
Q3
Q0
Pair
Pair
Error
−1
+1
Current
Quadrature
Pair
Byte
Code
00
00
No Rotation
0
0
0
0
0
000h
00
01
Turns right, +1
0
0
1
0
1
003h
00
10
Turns left, −1
0
1
0
1
0
00Ch
00
11
Error
1
0
0
1
1
049h
01
00
Turns left
0
0
0
0
0
000h
01
01
No rotation
0
0
0
0
1
001h
01
10
Error
1
0
0
1
0
048h
01
11
Turns right
0
0
0
1
1
009h
10
00
Turns right
0
0
0
0
0
000h
10
01
Error
1
0
0
0
1
041h
10
10
No rotation
0
0
0
1
0
008h
10
11
Turns left
0
0
0
1
1
009h
11
00
Error
1
0
0
0
0
040h
11
01
Turns left
0
0
0
0
1
001h
11
10
Turns right
0
0
0
1
0
008h
11
11
No rotation
0
0
0
1
1
009h
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...