aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_encoders.md
diff options
context:
space:
mode:
authortimothynsheehan <timothynsheehan@gmail.com>2021-05-07 03:47:10 +0930
committerGitHub <noreply@github.com>2021-05-06 20:17:10 +0200
commitf3a162946934807e134883f4fe80400300ec127f (patch)
treef5c4d751071a695f02e7c6dc1fdb406561ac210d /docs/feature_encoders.md
parent3d922e6257752b54885b7dd28648eed7126b6024 (diff)
downloadqmk_firmware-f3a162946934807e134883f4fe80400300ec127f.tar.gz
qmk_firmware-f3a162946934807e134883f4fe80400300ec127f.zip
Add docs on multiple encoders sharing pins (#11678)
Added explanation of how multiple encoders can share pins and the limitations of this configuration
Diffstat (limited to 'docs/feature_encoders.md')
-rw-r--r--docs/feature_encoders.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md
index e2cafdac4..4338c85e8 100644
--- a/docs/feature_encoders.md
+++ b/docs/feature_encoders.md
@@ -81,3 +81,20 @@ void encoder_update_user(uint8_t index, bool clockwise) {
81## Hardware 81## Hardware
82 82
83The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground. 83The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
84
85## Multiple Encoders
86
87Multiple encoders may share pins so long as each encoder has a distinct pair of pins.
88
89For example you can support two encoders using only 3 pins like this
90```
91#define ENCODERS_PAD_A { B1, B1 }
92#define ENCODERS_PAD_B { B2, B3 }
93```
94
95You could even support three encoders using only three pins (one per encoder) however in this configuration, rotating two encoders which share pins simultaneously will often generate incorrect output. For example:
96```
97#define ENCODERS_PAD_A { B1, B1, B2 }
98#define ENCODERS_PAD_B { B2, B3, B3 }
99```
100Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case