Use ST6 analog inputs to implement multiple key decoding
This document describes a technique for decoding multiple keys on ST6 microcontrollers by connecting them to the Analog to Digital Converter (ADC) via resistive voltage dividers. This method allows for full freedom in circuit layout and avoids false key detection without requiring static current.
| Maximum number of keys | 10 keys |
|---|---|
| ADC Linearity | ±2 LSB |
| Minimum distance between keys | 4 LSB |
| Recommended minimum distance | 8 LSB |
The circuit uses a pull-up resistor and serial resistors connected to the ADC input to form a resistive voltage divider. Pressing a key changes the voltage at the ADC input, which is then converted to a digital value to identify the key.
No, if more than one key is pressed simultaneously, the system detects the key closest to the ADC input in the chain, allowing for key prioritization.