SlideShare a Scribd company logo
www.researchdesignlab.com Page 1
LCD Keypad Shield
LCD KEYPAD SHIELD
www.researchdesignlab.com Page 2
LCD Keypad Shield
Table of Contents
LCD KEYPAD SHIELD ................................................................................................................ 1
OVERVIEW ................................................................................................................................... 3
INTRODUCTION ...................................................................................................................... 3
FEATURES ................................................................................................................................ 3
APPLICATIONS........................................................................................................................ 4
CIRCUIT DIAGRAM ................................................................................................................ 4
ARDUINO CODE ...................................................................................................................... 5
OUTPUT..................................................................................................................................... 8
RELATED PRODUCTS ............................................................................................................ 9
www.researchdesignlab.com Page 3
LCD Keypad Shield
OVERVIEW
INTRODUCTION
One of the basic interfacing requirements for the hobbyists or electronics enthusiasts is I/P
(keypad) and O/P (LCD display) for prototype applications. This shield uses minimum number
I/O’s that is 4 bits for LCD data and 2 control signal lines for the same. A single analog pin (Pin
A0) is multiplexed to read 5 input key switches (Navigation keys). Each key has been pulled up
to a different voltage level, so a different voltage will be generated every time a user selects a
key. This voltage could be read by the analog pin A0 on the board. Hence saves the no of I/O
pins. The backlight of the LCD could be controlled by setting PWM (Pin D10) by adding a few
lines of code.
FEATURES
 16X2 Blue color back light LCD.
 A single Analog pin is multiplexed to read 5 input Keys.
 Optional PWM based Back light control.
 Stackable on UNO shield
 High quality PCB FR4 Grade with FPT Certified.
www.researchdesignlab.com Page 4
LCD Keypad Shield
APPLICATIONS
 Calculators
 Cameras
 Cash Registers
 Clock Radios
 Digital Meters
 Hand-held TV & Terminals
 Hand-held Data Collection
 Heart Monitoring Devices
CIRCUIT DIAGRAM
www.researchdesignlab.com Page 5
LCD Keypad Shield
ARDUINO CODE
/*
* Project name:
LCD KEYPAD Shield
* Copyright
(c) Researchdesignlab.com
* Description:
* Test configuration:
MCU: ATMEGA328
Dev.Board: Arduino uno
Oscillator: 16 MHz
Software: Arduino
*/
/*
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
*/
// include the library code:
#include <LiquidCrystal.h>
int sensorValue = 0; // value read from the keypad
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensorPin = A0;
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
www.researchdesignlab.com Page 6
LCD Keypad Shield
delay(2000);
}
void loop() {
lcd.clear(); // clear lcd display
lcd.setCursor(0, 0); // set the cursor to column 0, line 0
lcd.print("LCD KEYPAD Shield");
lcd.setCursor(0, 1); // set the cursor to column 0, line 1
// read the input on analog pin 0 of keypad :
sensorValue = analogRead(sensorPin);
// check if the keypad is pressed disply keypad on lcd using sensorValue .
if(sensorValue<=10)
lcd.print("RIGHT KEY");
else if((sensorValue<=492)&&(sensorValue>=482))
lcd.print("DOWN KEY");
else if((sensorValue<=325)&&(sensorValue>=315))
lcd.print("UP KEY");
else if((sensorValue<=595)&&(sensorValue>=585))
lcd.print("LEFT KEY");
else if((sensorValue<=765)&&(sensorValue>=755))
lcd.print("SELECT KEY");
else
lcd.print("NO KEY PRESSED");
delay(500);
}
SERIAL COMMUNICATION
const int analogInPin = A0; // Analog input pin that the potentiometer is
attached to
int sensorValue = 0; // value read from the pot
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
www.researchdesignlab.com Page 7
LCD Keypad Shield
delay(1000);
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// check if the keypad is pressed disply keypad on lcd using sensorValue .
if(sensorValue<=10)
{
Serial.write(byte(0X01));
Serial.write(byte(0X80));
Serial.println("RIGHT KEY");
}else if((sensorValue<=492)&&(sensorValue>=482))
{
Serial.write(byte(0X01));
Serial.write(byte(0X80));
Serial.println("DOWN KEY");
}
else if((sensorValue<=325)&&(sensorValue>=315))
{
Serial.write(byte(0X01));
Serial.write(byte(0X80));
Serial.println("UP KEY");
}
else if((sensorValue<=595)&&(sensorValue>=585))
{
Serial.write(byte(0X01));
Serial.write(byte(0X80));
Serial.println("LEFT KEY");
}else if((sensorValue<=765)&&(sensorValue>=755))
{
Serial.write(byte(0X01));
Serial.write(byte(0X80));
Serial.println("SELECT KEY");
}
else
www.researchdesignlab.com Page 8
LCD Keypad Shield
{
Serial.write(byte(0X01));
Serial.write(byte(0X80));
Serial.println("NO KEY PRESSED");
}
delay(1000);
}
OUTPUT
www.researchdesignlab.com Page 9
LCD Keypad Shield
RELATED PRODUCTS
RDL- UNO ATMEGA328 Development Board 4x4 Matrix Keypad
LCD Interfacing Module Graphical LCD

More Related Content

PDF
KDU Zebra - Manual do Dispositivo
PDF
PDF
Dell SC4020 and SC9000 All Flash Solutions For MEDITECH Magic, CS 5.x and MT 6.x
PDF
Dell Vostro 3568
PDF
802801 gbm
PDF
13mkz
PDF
13fusion1
PDF
Dell Vostro 5480: Laptop văn phòng mỏng nhẹ
KDU Zebra - Manual do Dispositivo
Dell SC4020 and SC9000 All Flash Solutions For MEDITECH Magic, CS 5.x and MT 6.x
Dell Vostro 3568
802801 gbm
13mkz
13fusion1
Dell Vostro 5480: Laptop văn phòng mỏng nhẹ

What's hot (12)

PDF
Zd12xx release notes_9.9
PDF
Learn LCD Arduino-v1
PDF
PN985-MG3500-SDK-Guide
PDF
Dell Vostro 5459 - Laptops Trần Phát
PDF
13fusionhybrid
PDF
13mkzhybrid
PDF
Dell Vostro 3671 datasheet
PDF
Dell Vostro 5581 Laptop giá rẻ chất lượng của Dell
PDF
Dell vostro 5568 Laptops Trần Phát
PDF
Dell alienware 17r4
PDF
Zaavar
Zd12xx release notes_9.9
Learn LCD Arduino-v1
PN985-MG3500-SDK-Guide
Dell Vostro 5459 - Laptops Trần Phát
13fusionhybrid
13mkzhybrid
Dell Vostro 3671 datasheet
Dell Vostro 5581 Laptop giá rẻ chất lượng của Dell
Dell vostro 5568 Laptops Trần Phát
Dell alienware 17r4
Zaavar
Ad

Similar to LCD Keypad Shield (20)

PDF
2022-BEKM 3453 - LCD and keypad.pdf
DOCX
Keypad interfacing 8051 -NANOCDAC
PPT
Lcd & keypad
PPTX
PDF
Password Based Access Control System using Microcontroller
PPT
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
PDF
Automatic room light controller with visible counter
PDF
Microcontroladores: El microcontrolador 8051 con LCD 16x2
DOC
Microcontroller Programming Assignment
PPT
Presentation2 1-150523155048-lva1-app6892
PPTX
microcontroller and embedded system
PDF
Combine the keypad and LCD codes in compliance to the following requ.pdf
PPTX
Final Presentation
PDF
Lcd tutorial
DOC
EMBEDDED PROJECTS ABSTRACT:Biometric fingerprint based access control and lib...
DOCX
Lcd interfacing
PPTX
131080111003 mci
PDF
L14 kb-lcd-interfacing-with-atmega328 p
PPT
Interfacing keypad
PDF
ATmega8 based password controlled home appliance
2022-BEKM 3453 - LCD and keypad.pdf
Keypad interfacing 8051 -NANOCDAC
Lcd & keypad
Password Based Access Control System using Microcontroller
jbptunikompp-gdl-syahrul-23476-14-14-inter-y.ppt
Automatic room light controller with visible counter
Microcontroladores: El microcontrolador 8051 con LCD 16x2
Microcontroller Programming Assignment
Presentation2 1-150523155048-lva1-app6892
microcontroller and embedded system
Combine the keypad and LCD codes in compliance to the following requ.pdf
Final Presentation
Lcd tutorial
EMBEDDED PROJECTS ABSTRACT:Biometric fingerprint based access control and lib...
Lcd interfacing
131080111003 mci
L14 kb-lcd-interfacing-with-atmega328 p
Interfacing keypad
ATmega8 based password controlled home appliance
Ad

More from Raghav Shetty (20)

PDF
8 Channel Relay Board-Bluetooth
PDF
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
PDF
4 Channel Relay Board 12V-Compatible for Arduino
PDF
8 Channel Relay Board-Rs485
PDF
Xbee X-CTU Software
PDF
Digitla Vibration Sensor
PDF
Thermal Printer
PDF
Digital Soil Moisture Sensor
PDF
Micro SD Memory Card Interface for 5V MCU
PDF
Micro SD Memory Card Interface for 3.3V MCU
PDF
Regulated Power Supply
PDF
PIC Project Board
PDF
8 Channel Bi Directional Logic Level Converter
PDF
L298 Motor Driver
PDF
Joystick Shield
PDF
Force Sensor
PDF
Plastic REED Float Switch
PDF
Flex Sensor
PDF
Serial EEPROM
PDF
DTMF Decoder Shield for Arduino
8 Channel Relay Board-Bluetooth
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 12V-Compatible for Arduino
8 Channel Relay Board-Rs485
Xbee X-CTU Software
Digitla Vibration Sensor
Thermal Printer
Digital Soil Moisture Sensor
Micro SD Memory Card Interface for 5V MCU
Micro SD Memory Card Interface for 3.3V MCU
Regulated Power Supply
PIC Project Board
8 Channel Bi Directional Logic Level Converter
L298 Motor Driver
Joystick Shield
Force Sensor
Plastic REED Float Switch
Flex Sensor
Serial EEPROM
DTMF Decoder Shield for Arduino

Recently uploaded (20)

PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Empathic Computing: Creating Shared Understanding
PDF
Electronic commerce courselecture one. Pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Spectroscopy.pptx food analysis technology
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Understanding_Digital_Forensics_Presentation.pptx
Programs and apps: productivity, graphics, security and other tools
Advanced methodologies resolving dimensionality complications for autism neur...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
The Rise and Fall of 3GPP – Time for a Sabbatical?
Unlocking AI with Model Context Protocol (MCP)
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Empathic Computing: Creating Shared Understanding
Electronic commerce courselecture one. Pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25 Week I
Per capita expenditure prediction using model stacking based on satellite ima...
Spectroscopy.pptx food analysis technology
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

LCD Keypad Shield

  • 1. www.researchdesignlab.com Page 1 LCD Keypad Shield LCD KEYPAD SHIELD
  • 2. www.researchdesignlab.com Page 2 LCD Keypad Shield Table of Contents LCD KEYPAD SHIELD ................................................................................................................ 1 OVERVIEW ................................................................................................................................... 3 INTRODUCTION ...................................................................................................................... 3 FEATURES ................................................................................................................................ 3 APPLICATIONS........................................................................................................................ 4 CIRCUIT DIAGRAM ................................................................................................................ 4 ARDUINO CODE ...................................................................................................................... 5 OUTPUT..................................................................................................................................... 8 RELATED PRODUCTS ............................................................................................................ 9
  • 3. www.researchdesignlab.com Page 3 LCD Keypad Shield OVERVIEW INTRODUCTION One of the basic interfacing requirements for the hobbyists or electronics enthusiasts is I/P (keypad) and O/P (LCD display) for prototype applications. This shield uses minimum number I/O’s that is 4 bits for LCD data and 2 control signal lines for the same. A single analog pin (Pin A0) is multiplexed to read 5 input key switches (Navigation keys). Each key has been pulled up to a different voltage level, so a different voltage will be generated every time a user selects a key. This voltage could be read by the analog pin A0 on the board. Hence saves the no of I/O pins. The backlight of the LCD could be controlled by setting PWM (Pin D10) by adding a few lines of code. FEATURES  16X2 Blue color back light LCD.  A single Analog pin is multiplexed to read 5 input Keys.  Optional PWM based Back light control.  Stackable on UNO shield  High quality PCB FR4 Grade with FPT Certified.
  • 4. www.researchdesignlab.com Page 4 LCD Keypad Shield APPLICATIONS  Calculators  Cameras  Cash Registers  Clock Radios  Digital Meters  Hand-held TV & Terminals  Hand-held Data Collection  Heart Monitoring Devices CIRCUIT DIAGRAM
  • 5. www.researchdesignlab.com Page 5 LCD Keypad Shield ARDUINO CODE /* * Project name: LCD KEYPAD Shield * Copyright (c) Researchdesignlab.com * Description: * Test configuration: MCU: ATMEGA328 Dev.Board: Arduino uno Oscillator: 16 MHz Software: Arduino */ /* The circuit: * LCD RS pin to digital pin 12 * LCD Enable pin to digital pin 11 * LCD D4 pin to digital pin 5 * LCD D5 pin to digital pin 4 * LCD D6 pin to digital pin 3 * LCD D7 pin to digital pin 2 * LCD R/W pin to ground * 10K resistor: * ends to +5V and ground * wiper to LCD VO pin (pin 3) */ // include the library code: #include <LiquidCrystal.h> int sensorValue = 0; // value read from the keypad // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int sensorPin = A0; void setup() { // set up the LCD's number of columns and rows: lcd.begin(16, 2);
  • 6. www.researchdesignlab.com Page 6 LCD Keypad Shield delay(2000); } void loop() { lcd.clear(); // clear lcd display lcd.setCursor(0, 0); // set the cursor to column 0, line 0 lcd.print("LCD KEYPAD Shield"); lcd.setCursor(0, 1); // set the cursor to column 0, line 1 // read the input on analog pin 0 of keypad : sensorValue = analogRead(sensorPin); // check if the keypad is pressed disply keypad on lcd using sensorValue . if(sensorValue<=10) lcd.print("RIGHT KEY"); else if((sensorValue<=492)&&(sensorValue>=482)) lcd.print("DOWN KEY"); else if((sensorValue<=325)&&(sensorValue>=315)) lcd.print("UP KEY"); else if((sensorValue<=595)&&(sensorValue>=585)) lcd.print("LEFT KEY"); else if((sensorValue<=765)&&(sensorValue>=755)) lcd.print("SELECT KEY"); else lcd.print("NO KEY PRESSED"); delay(500); } SERIAL COMMUNICATION const int analogInPin = A0; // Analog input pin that the potentiometer is attached to int sensorValue = 0; // value read from the pot void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600);
  • 7. www.researchdesignlab.com Page 7 LCD Keypad Shield delay(1000); } void loop() { // read the analog in value: sensorValue = analogRead(analogInPin); // check if the keypad is pressed disply keypad on lcd using sensorValue . if(sensorValue<=10) { Serial.write(byte(0X01)); Serial.write(byte(0X80)); Serial.println("RIGHT KEY"); }else if((sensorValue<=492)&&(sensorValue>=482)) { Serial.write(byte(0X01)); Serial.write(byte(0X80)); Serial.println("DOWN KEY"); } else if((sensorValue<=325)&&(sensorValue>=315)) { Serial.write(byte(0X01)); Serial.write(byte(0X80)); Serial.println("UP KEY"); } else if((sensorValue<=595)&&(sensorValue>=585)) { Serial.write(byte(0X01)); Serial.write(byte(0X80)); Serial.println("LEFT KEY"); }else if((sensorValue<=765)&&(sensorValue>=755)) { Serial.write(byte(0X01)); Serial.write(byte(0X80)); Serial.println("SELECT KEY"); } else
  • 8. www.researchdesignlab.com Page 8 LCD Keypad Shield { Serial.write(byte(0X01)); Serial.write(byte(0X80)); Serial.println("NO KEY PRESSED"); } delay(1000); } OUTPUT
  • 9. www.researchdesignlab.com Page 9 LCD Keypad Shield RELATED PRODUCTS RDL- UNO ATMEGA328 Development Board 4x4 Matrix Keypad LCD Interfacing Module Graphical LCD