APPLICATION NOTE
ST7 KEYPAD DECODING TECHNIQUES, IMPLEMENTING
WAKE-UP ON KEYSTROKE
by Microcontroller Division Application Team
INTRODUCTION
The goal of this application note is to present an example of the use of the HALT mode.
In this application, the MCU (here a ST72251) is waked up by an external interrupt caused by
someone pressed a key on the 4x4 matrixed keypad.
1 ST7 / KEYBOARD INTERFACE
Rows are connected to inputs with pull-up and interrupts (Port C). Columns are connected to
Port A configured as output. The result of the interrupt (the value of the pressed key) is sent on
LEDS (Port B) and stored into the X register. In our configuration, we have to add 4 pull-up re-
sistors on Port A (from PA0 to PA3) to be able to apply a high level on the corresponding pads.
Figure 1. ST7 / keypad interface set-up
4x100k
8x560
V
DD
PC0
PC1
PC2
PC3
ST7
PA0
PA1
PA2
GND
PA3
AN980/1098
1/10
1