[sdiy] Reading two buttons with a single IO pin

Tom Wiltshire tom at electricdruid.net
Sat Feb 21 12:00:46 CET 2015


On 20 Feb 2015, at 23:33, John Speth <jspeth at avnera.com> wrote:

> 
> Word to the wise: Make a very in depth study of tolerance to voltage
> divider ref voltage variations and resistor variations.  Then add a fudge
> factor for unforeseen variations.

Yes, this is important.
Using only two bits of the ADC, I've got simple ranges of 0-0.25, 0.25-0.5, 0.5-0.75, 0.75-1 and I set the inputs up to give 1/8th, 3/8ths, 5/8ths, and 7/8ths - e.g. right in the middle of each range. With 5V, each range is 1.25V, so I've got over 0.5V tolerance in each direction. That should be enough fudge factor.

Tom




More information about the Synth-diy mailing list