STMicroelectronics AN979 Application Note Driving an Analog Keyboard with the ST7 ADC

The goal of this application note is to present a standard example of the use of the Analog to Digital Converter (ADC) of the ST7. In this note, the ADC is used to convert a 16-key analog keyboard. The technique for the keyboard is to connect the keys by resistive dividers to one of the converter inputs. The Application note is based on ST72F324 which has an embedded 10-bit ADC.


STMicroelectronics AN979 Application Note Driving an Analog Keyboard with the ST7 ADC - cover page
Brand
STMicroelectronics
Category
microcontrollers
Document type
Application Note
Language
English
Pages
14
File format
PDF
File size
140 KB
Published
07 August, 2012
Updated
29 September, 2023
Model
ST7
MD5 checksum
74AAFEA09F4D9D0457E40E2899832BB0

About this manual

The document presents a standard example of utilizing the Analog-to-Digital Converter (ADC) in ST7 microcontrollers, specifically based on the ST72F324 model. It details the hardware interface required to connect an analog keyboard with resistive dividers to the converter inputs.

The note covers the configuration of I/O ports and ADC registers, including control bits for speed and channel selection. It provides practical limitations regarding resistor tolerance and ADC errors, along with specific digital value thresholds for key detection in a 16-key setup.

What's inside

  • Introduction
  • ST7 / Keyboard Interface
  • ST72324 Configuration
  • Analog to Digital Converter Characteristics
  • Analog Keyboard Principle
  • Key Detection Limits
  • Software Description

Specifications

ADC Resolution10-bit successive approximation converter
Max Analog InputsUp to 12 analog inputs on ST72F324
Conversion Time15 ADC cycles including sampling time of 4 ADC cycles
Total Unadjusted Error (TUE)4 LSB

Frequently asked questions

Which ST7 model was used to test this application?

The application has been tested with a ST72F324 configured as described.

How many keys can theoretically be decoded with a 10-bit ADC?

With a 10-bit ADC, up to 1023 keys can be decoded.

What is the recommended resistor tolerance for the pull-up?

It is advised to use a 1% tolerance resistor for the pull-up.

Download PDF (140 KB)

More STMicroelectronics Manuals


View all STMicroelectronics manuals →