Interfacing a 4x4 Keyboard to an AT91

13
1 Interfacing a 4x4 Keyboard to an AT91 Microcontroller Introduction This Application Note describes programming techniques implemented on the AT91 ARM-based microcontroller for scanning a 4x4 Keyboard matrix usually found in both consumer and industrial applica tions for numeric data entry. AT91 Keyboard interface In this application, a 4x4 matrix keypad requiring eight Input/Output ports for interfac- ing is used as an example. Rows are connected to Peripheral Input/Output (PIO) pins configured as output. Col- umns are connected to PIO pins configured as input with interrupts. In this configuration, four pull-up resistors must be added in order to apply a high level on the corresponding input pins as shown in Figure 1. The corresponding hexadecimal value of the pressed key is sent on four LEDs. Figure 1. Keyboard Interface PIO PIO PIO PIO PIO PIO PIO PIO 100K 100K 100K 100K V CC V CC V CC V CC Columns (Input with Interrupt) Rows (Output) AT91 A 7 0 8 4 1 2 5 B 9 6 3 F E D C AT91 ARM  ® Thumb  ® Microcontrollers Application Note Rev. 2669A–ATARM– 01/03

Transcript of Interfacing a 4x4 Keyboard to an AT91

Page 1: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 1/13

Page 2: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 2/13

Page 3: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 3/13

Page 4: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 4/13

Page 5: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 5/13

Page 6: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 6/13

Page 7: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 7/13

Page 8: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 8/13

Page 9: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 9/13

Page 10: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 10/13

Page 11: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 11/13

Page 12: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 12/13

Page 13: Interfacing a 4x4 Keyboard to an AT91

8/14/2019 Interfacing a 4x4 Keyboard to an AT91

http://slidepdf.com/reader/full/interfacing-a-4x4-keyboard-to-an-at91 13/13