ST AN431 APPLICATION NOTE handbook

Use ST6 analog inputs to implement multiple key decoding


ST AN431 APPLICATION NOTE handbook - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
15
File format
PDF
File size
489 KB
Published
07 August, 2012
Updated
30 September, 2023
Model
ST6
MD5 checksum
4E229882BAF65A9C3644E1CB9805DB57

About this manual

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.

What's inside

  • Introduction
  • Basic Circuit
  • Principle of Operation
  • Practical Limitations
  • Extension for Wake Up
  • Key Input by Polling
  • Registers and Constants

Specifications

Maximum number of keys10 keys
ADC Linearity±2 LSB
Minimum distance between keys4 LSB
Recommended minimum distance8 LSB

Frequently asked questions

How does the analog key decoding circuit work?

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.

Can this method detect multiple keys pressed at once?

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.

Download PDF (489 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →