Uploaded August 2012 | Updated September 2026, 1 week ago
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.
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.
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.
Once the column number is detected, the controller set's all the rows to high. Now one by one each row is set to zero by controller and the earlier detected column is checked if it becomes zero. The row corresponding to which the column gets zero is the row number of the digit.The above process is very fast and even if the switch is pressed for a very small duration of time the controller can detect the key which is pressed. The controller displays the number corresponding to the row and column on the LCD.
-~-~~-~~~-~~-~-
Please watch: "Lifi Communication by Arduino UNO Download Project"
youtube.com/watch?v=c4gC8dbaiZg
-~-~~-~~~-~~-~-
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.
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.
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.
Once the column number is detected, the controller set's all the rows to high. Now one by one each row is set to zero by controller and the earlier detected column is checked if it becomes zero. The row corresponding to which the column gets zero is the row number of the digit.The above process is very fast and even if the switch is pressed for a very small duration of time the controller can detect the key which is pressed. The controller displays the number corresponding to the row and column on the LCD.
-~-~~-~~~-~~-~-
Please watch: "Lifi Communication by Arduino UNO Download Project"
youtube.com/watch?v=c4gC8dbaiZg
-~-~~-~~~-~~-~-
![H Bridge motor driving circuit
Tishitu explains
The H-Bridge is designed to drive a motor clockwise and anticlockwise.
To reverse a motor, the supply must be reversed and this is what the H-Bridge does.
An H-Bridge can be made with SWITCHES, RELAYS, TRANSISTORS or MOSFETS.
Note: Some circuits are just demonstration circuits and need damper diodes (protection diodes) to reduce spikes.
THE H-BRIDGE
The circuits we will discuss are called a transistor H-BRIDGE. The active sections of the circuit create the letter H to produce the term H-Bridge.
There are a number of different H-Bridge designs and the actual circuit will depend on the number of transistors, the type of layout, the number of control lines, the voltage of the bridge, and a number of other factors.
Thats why we have a number of different designs to cover these variations.
This design uses 4 transistors. Both inputs must NEVER be HIGH (this will create a short-circuit and damage the transistors). However this circuit is a good design. The voltage on the H-Bridge can be any voltage and the control voltage just needs to be higher than 1v. The circuit provides OFF feature when both inputs are LOW but does not provide BRAKE feature.
An H bridge is an electronic circuit that enables a voltage to be applied across a load in either direction. These circuits are often used in robotics and other applications to allow DC motors to run forwards and backwards.[1]
Most DC-to-AC converters (power inverters), most AC/AC converters, the DC-to-DC push pull converter, most motor controllers, and many other kinds of power electronics use H bridges. In particular, a bipolar stepper motor is almost invariably driven by a motor controller containing two H bridges.
TISHITU
ISO: 9001-2008
RESEARCH AND CONSULTANCY CELL OF INDUSTRIAL APPLICATION
A Joint Accreditation System of Australia and New Zealand
Copyright © All Rights Reserved www.tishitu.org Reg No.08122629691/SSI
Accreditation No. M3111204IN
-~-~~-~~~-~~-~-
Please watch: Lifi Communication by Arduino UNO Download Project
https://www.youtube.com/watch?v=c4gC8dbaiZg
-~-~~-~~~-~~-~- H Bridge motor driving circuit](https://i.ytimg.com/vi/d90HPrJ4XW8/mqdefault.jpg)









