English
Language : 

AN431 Datasheet, PDF (1/15 Pages) BCD Semiconductor Manufacturing Limited – ADJUSTABLE PRECISION SHUNT REGULATORS
AN431
Application note
Using ST6 analog inputs for multiple key decoding
INTRODUCTION
The ST6 on-chip Analog to Digital Converter (ADC) is a useful peripheral integrated into the sili-
con of the ST6 family members. The flexibility of the I/O port structure allows the multiplexing of
up to 13/8 Analog Inputs into the converter in a 28/20 pin device for the ST6210/15 2k ROM and
ST6220/25 4k ROM families, enabling full freedom in circuit layout. Many other members of the
ST6 family also offer the Analog to Digital converter.
One of the more novel and practical applications of this converter, is to decode a number of keys.
The technique is to connect the keys by resistive voltage dividers to the converter inputs. An ex-
ample of key detection using 10 keys is illustrated in this note.
Using the Analog to Digital converter in this fashion does not require a static current and avoids
false key detection.
BASIC CIRCUIT
The basic circuit of the key decoder consists of a pull-up resistor connected to the ST6 Analog to
Digital converter input with the first key directly switching to ground. The following keys are then
connected in sequence to the ADC input through serial resistors. The number of keys which may
be detected depends on the tolerance of the resistors used. It can be seen that if more than one
key is pressed at the same time, the key detected will be the next key in the chain closest to the
ADC input. This also allows the keys in the keyboard to be prioritized.
June 2008
Rev 2
1/15