English
Language : 

AN979 Datasheet, PDF (1/14 Pages) STMicroelectronics – DRIVING AN ANALOG KEYBOARD WITH THE ST7 ADC
AN979
APPLICATION NOTE
DRIVING AN ANALOG KEYBOARD WITH THE ST7 ADC
By Microcontroller Division Applications
1 INTRODUCTION
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 key-
board is to connect the keys by resistive dividers to one of the converter inputs. The Applica-
tion note is based on ST72F324 which has an embedded 10-bit ADC.
2 ST7 / KEYBOARD INTERFACE
Connect the analog keyboard to one of the analog inputs of the ST7 and connect the high and
low voltage references as shown in Figure 1.
Figure 1. ST7 / keyboard interface set-up
ST7
VDD
VSS
ADC
analog
input
AINx
KEYBOARD
high voltage reference
low voltage reference
keyboard
output
3 ST72324 CONFIGURATION
The application has been tested with a ST72F324 configured as described below. Refer to the
datasheet for more details on configuring the ST72F324.
3.1 I/O CONTROL
Depending on the number of pins available on the device package, the ST7 theoretically al-
lows up to 16 multiplexed analog inputs to the ADC, but in practice, on the ST72F324 device,
there can be up to 12 analog inputs. They are alternate functions I/O Port D (PD0-PD5), Port
AN979/0303
1/14
1