Saturday 14 July 2018

Keypad

KEYPAD

A keypad is a set of buttons arranged in a block or "pad" which usually bear digits, symbols and usually a complete set of alphabetical letters. If it mostly contains numbers then it can also be called a numeric keypad. Keypads are found on many alphanumeric keyboards and on other devices such as calculators, push, combination locks, and digital door locks, which require mainly numeric input.
A computer keyboard usually has a small numeric keypad on the side, in addition to the other number keys on the top, but with a calculator-style arrangement of buttons that allow more efficient entry of numerical data. This number pad (commonly abbreviated to "numpad") is usually positioned on the right side of the keyboard because most people are right-handed.
Many laptop computers have special function keys which turn part of the alphabetical keyboard into a numerical keypad as there is insufficient space to allow a separate keypad to be built into the laptop's chassis. Separate external plug-in keypads can be purchased.
As a general rule, the keys on calculator-style keypads are arranged such that 123 is on the bottom row. Whereas, in a telephone keypad, either in a home or mobile phone, there will be the 123-keys at the top. A phone key-pad also has the special buttons labelled * (star) and # (octothorpe, number sign, "pound", "hex" or "hash") on either side of the zero key. Most of the keys on a telephone also bear letters which have had several auxiliary uses, such as remembering area codes or whole telephone numbers.
The keypad of a calculator contains the digits 0 through 9, from bottom upwards, together with the four arithmetic operations, thedecimal point and other more advanced mathematical functions.
The reason that the keypad of keyboards and calculators are different is that the first security key codes had been invented before the touchtone telephone, and did not require the extra + - % / keys and so the touch tone adopted this 1, 2, 3 at the top rather than 1, 2, 3 at the bottom as it too only required 12 keys.[citation needed]
Keypads are also a feature of some combination locks. This type of lock is often used on doors, such as that found at the main entrance to some offices

Keypad is a widely used input device with lots of application in our everyday life. From a simple telephone to keyboard of a computer, ATM, electronic lock, etc., keypad is used to take input from the user for further processing. In this article we are interfacing keypad with the MCU AT89C51 and displaying the corresponding number on LCD.  This module can be further used in a number of systems to interfaced keypad with microcontroller and other processors to get desired output. The program to interface keypad with controller is written in C language which is very easy to understand.

Image result for keypad project
Keypad is organized as a matrix of switches in rows and column. The article uses a 4X3 matrix keypad and a 16x2 LCD for displaying the output of keypad.
The circuit diagram shows the connection of keypad with the controller. Port P2 of the microcontroller is used to send the data for displaying on the LCD. P1^1, P1^2, P1^3 pins of microcontroller is connected to RS, RW, EN pins of LCD respectively. Port P0 is used to scan input from the keypad (refer circuit diagram for connection).

The concept of interfacing keypad with the MCU is simple. Every number is assigned two unique parameters, i.e., row and column number (n(R, C) for example 6 (2, 3)). Hence every time a key is pressed the number is identified by detecting the row and column number of the key pressed.

Initially all the rows are set to zero by the controller and the columns are scanned to check if any key is pressed. In case no key is pressed the output of all the columns will be high.
Image result for keypad pin out 
Whenever a key is pressed the row and column corresponding to the key will get short, resulting in the output of the corresponding column goes to go low (since we have made all the rows zero). This gives the column number of the pressed key.

Related image

No comments:

Post a Comment