AN839 application note introduces a technique for decoding multiple keys using only one I/O port pin. The technique is based on connecting the keys by a resistive voltage divider to the ADC input.
This document details a practical application for decoding multiple keys using the ST6 family's on-chip Analog to Digital Converter (ADC). The technique involves connecting keys to a single I/O port pin through a resistive voltage divider, allowing the system to identify pressed keys based on the resulting voltage levels. This approach reduces the number of required I/O pins compared to traditional matrix keyboards.
| Maximum number of keys | 10 |
|---|---|
| Supply voltage for conversion results | 5V |
| ADC resolution | 8-bit |
The practical maximum number of keys is limited by the precision of the resistors, but the document provides a specific example for a 10-key system.
The system detects the key in the chain closest to the ADC input, allowing keys to be prioritized.