4x4 keypad.pdf

1|P ag e 4x4 MATRIX KEYPAD An ISO 9001-2008 Certified Company Order Code RDL/4X4KP/13/001/V1.0 4x4 Matrix Keypad A 4x4

Views 115 Downloads 0 File size 309KB

Report DMCA / Copyright

DOWNLOAD FILE

Recommend stories

Citation preview

1|P ag e 4x4 MATRIX KEYPAD

An ISO 9001-2008 Certified Company Order Code RDL/4X4KP/13/001/V1.0

4x4 Matrix Keypad A 4x4 matrix keypad requiring eight Input/Output ports for interfacing isused as an example. Rows are connected to Peripheral Input/Output (PIO) pins configured as output. Columns 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.

Features    

Contact debouncing. Easy to interface. Interfaces to any microcontroller or microprocessor. Data valid output signal for interrupt activation.

Applications  Vending machines.  Public phones.  Ticketing.

Specifications Parameter Operating force Key lifetime

Value 60 +/- 20cN 1x109 million operations

www.researchdesignlab.com

2|P ag e

An ISO 9001-2008 Certified Company Order Code RDL/4X4KP/13/001/V1.0

4x4 MATRIX KEYPAD

Pin Details Pin Name 1-4 R0-R3 5-8 C0-C3

Details rows columns

Working 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 applications for numeric data entry.,AT91 Keyboard interface In this application, a 4x4 matrix keypad requiring eight Input/Output ports for interfacing is used as an example. Rows are connected to Peripheral Input/Output (PIO) pins configured as output. Columns 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.

www.researchdesignlab.com

3|P ag e 4x4 MATRIX KEYPAD

An ISO 9001-2008 Certified Company Order Code RDL/4X4KP/13/001/V1.0

Figure 1. Keyboard Interface

www.researchdesignlab.com

4|P ag e 4x4 MATRIX KEYPAD

An ISO 9001-2008 Certified Company Order Code RDL/4X4KP/13/001/V1.0

Sample Application

www.researchdesignlab.com

5|P ag e

An ISO 9001-2008 Certified Company Order Code RDL/4X4KP/13/001/V1.0

4x4 MATRIX KEYPAD

Code /*

void DISPLAY_ON_LCD(unsigned char DATA);

* Project name:

char check_key(void);

4x4 Keypad Matrix

void delay(unsigned int time);

* Copyright

void DELAY()

(c) Researchdesignlab.com

{

* Description:

unsigned int X=800000;

* Test configuration:

while(X--);

MCU:

}

Dev.Board:

AT89S52 8051

void main()

Oscillator:

11.0592 MHz

{

Software:

Keil uVision3

unsigned char LCD_CMD[]={0X38,0X0f,0X06,0X01,0X80},COU NT,TEMP1=0,kk; // LCD commands

*/ #include #include"reg51.h"

for(COUNT=0;COUNT