S0
‘b00
S1
‘b01
S2
‘b11
S3
‘b10
+1
+1
+1
+1
-1
-1
-1
-1
S0
‘b00
S1
‘b01
S2
‘b11
S3
‘b10
+1
+1
+1
+1
-1
-1
-1
-1
S0
‘b00
S1
‘b01
S2
‘b11
S3
‘b10
+1
+1
+1
+1
-1
-1
-1
-1
STATE
S0
S1
S2
S3
S1IN
0
0
1
1
S0IN
0
1
1
0
Relationship between inputs and its state
OVSQUAD1X mode
Transitions between States
S0
and
S1
updates the counter
OVSQUAD2X mode
Transitions between States
S0
and
S1
and between
S3
and
S2
updates the counter
OVSQUAD4X mode
All state transitions updates the
counter
Figure 16.3. PCNT State Transitions for Different Oversampling Quadrature Decoder Modes
The counter direction can be read from the DIR bit in PCNTn_STATUS register. Additionally, the DIRCNG interrupt in the PCNTn_IF is
generated when the direction change is detected. When a change is detected, the DIR bit in the PCNTn_STATUS register must be read
to determine the new direction.
In the oversampling quadrature decoder modes, the maximum input toggle frequency supported is 8KHz. For frequencies of 8KHz and
higher, incorrect decoding occurs. The different decoding modes and the counter updates are further illustrated by
Oversampling Quadrature Decoder 1X Mode on page 452
,
Figure 16.5 PCNT Oversampling Quadrature Decoder 2X Mode on page
Figure 16.6 PCNT Oversampling Quadrature Decoder 4X Mode on page 453
S0IN
S1IN
CNT
3
4
5
6
4
6
5
3
Period > 125 us
Figure 16.4. PCNT Oversampling Quadrature Decoder 1X Mode
Reference Manual
PCNT - Pulse Counter
silabs.com
| Building a more connected world.
Rev. 1.1 | 452