@@ -19,7 +19,6 @@ Example usage::
19
19
qe.init(cpc=128) # Specify 128 counts/cycle
20
20
qe.init(index=Pin(3)) # Specify Pin 3 as Index pulse input
21
21
qe.deinit() # turn off the Quadrature Encoder
22
- qe.init(match=64) # Set a match event at count 64
23
22
qe.irq(qe.IRQ_MATCH, value=100, handler=handler)
24
23
# Call the function handler at a match event
25
24
@@ -62,7 +61,7 @@ Constructors
62
61
(1000000000 * 2550 * 4 / CPU_CLK). A value of 0 sets the filter off.
63
62
- *cpc *\= value. Specify the number of counts per cycle. Since the
64
63
Encoder counts all four phases of the input signal, the cpc value has to be four
65
- time the ppr value given in the encoder data sheet. The position counter will count up
64
+ times the ppr value given in the encoder data sheet. The position counter will count up
66
65
from the 0 up to cpc - 1, and then reset to the init value of 0 and increase
67
66
the cycles counter by one. The default is: no cpc set. In that case the
68
67
position counter overflows at 2**32 - 1. When counting down, the cycles counter changes
@@ -78,7 +77,7 @@ The arguments phase_a, phase_b and filter_ns are generic across ports, all other
78
77
Methods
79
78
-------
80
79
81
- .. method :: Encoder.init(*, phase_a, phase_b, home, reverse, match_pin, filter_ns, cpc, match , signed, index)
80
+ .. method :: Encoder.init(*, phase_a, phase_b, home, match_pin, filter_ns, cpc, signed, index)
82
81
83
82
Modify settings for the Encoder object. See the above constructor for details
84
83
about the parameters.
@@ -183,7 +182,6 @@ Example usage::
183
182
counter.value(0) # Set the counter to 0
184
183
counter.init(cpc=128) # Specify 128 counts/cycle
185
184
counter.deinit() # turn off the Counter
186
- counter.init(match=1000) # Create a match event at count 1000
187
185
counter.irq(Counter.IRQ_MATCH, handler) # Call the function handler at a counter match
188
186
189
187
counter # show the Counter object properties
0 commit comments