16 X 2 LCD Keypad Shield for Arduino

From LinkSprite Playgound
Revision as of 03:16, 27 November 2012 by Jingfeng (talk | contribs) (Introduction)
Jump to: navigation, search

Introduction

The LCD and Keypad Shield gives you a handy 16-character by 2-line display, 5 buttons and a controllable backlight, plug it straight in on top of your Arduino board or other project shields. The display is set behind the shield for a low profile fitment and nice look and we've included panel mounting screw holes in the corners.

It's great when you want to build a stand-alone project with its own user interface that doesn't require a computer attached to send commands to your Arduino.

Works perfectly in 4-bit mode with the "LiquidCrystal" library included with the Arduino IDE, allowing you to control the LCD with a total of just 6 digital I/O lines. We've deliberately picked D4-D9 so that it doesn't interfere with pins required by other popular products such as the Ethernet Shield and EtherTen, so you can stack this on top of other shields to give you a local display.

The buttons provide "left", "right", "up", "down", and "select" while using just one analog input. That leaves the other analog inputs free for you to use in your projects.

The LCD backlight is connected to D3 and can be controlled for on/off, brightness and flashing effects.


1602 lcd keypad shield-02.jpg


Model:[LCD_16_2_SHIELD]

Features

  • 16x2 LCD using HD44780-compatible display module (white characters on blue background).
  • 5 buttons on one analog input (A0).
  • LCD backlight with current limiting, brightness and on/off controllable by D3, can be moved to D2, D10, A1, A2, A3, A4 or A5 for easy project pin compatibility.
  • Recessed LCD, panel mount screw holes and button layout suitable for panel or cabinet mounting if desired.
  • Reset button.
  • Power supply smoothing capacitor.
  • Pins used by shield clearly marked, LiquidCrystal library setup reference is on the bottom of the pcb for convenience.

Application Ideas

Cautions

The warnings and wrong operations possible cause dangerous.

Schematic

Specification

Pin definition and Rating

Mechanic Dimensions

Usage

Hardware Installation

Programming

The 16x2 LCD And Keypad Shield is very simple to use because it's fully compatible with the Arduino "LiquidCrystal" library. You can initialise the LCD and display messages on it with just a few lines of code, but it also gives you the flexibility to do more advanced projects such as display menu items and select them using the buttons. Power Requirements The LCD & Keypad Shield requires a good 5V power supply to ensure the backlight fully illuminates and the display contrast is high, and if you power your Arduino from USB with the LCD Shield attached you may experience a voltage drop over the USB cable. If you have trouble with display contrast or backlight brightness, try attaching a power supply of around 7 to 9Vdc to the 2.1mm DC jack on the Arduino. A typical symptom in an undervoltage situation is that one line of the LCD will show pale rectangles in place of the characters, and the other line will show nothing at all. The Arduino may even continue running normally because it's quite happy at just 4V or so, but the LCD & Keypad Shield won't function.

Library Requirements All the hard work of interfacing with the LCD Shield is handled by the LiquidCrystal library, which is included as part of the official Arduino distribution. You can check whether you have it installed by starting up the IDE and looking under Files -> Examples -> LiquidCrystal. If it exists, you're good to go.

Minimal Display Example To start up the LCD and display a message, open a new sketch in the Arduino IDE and paste in the following code:

<syntaxhighlight lang="c">

  1. include <LiquidCrystal.h>

LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );

void setup() {

 lcd.begin(16, 2);
 lcd.print("hello, world!");

}

void loop() {

   // your main loop code here...

}

</syntaxhighlight>

FAQ

Please list your question here:

Support

If you have questions or other better design ideas, you can go to our forum to discuss or creat a ticket for your issue at linksprite support.

Resources

  • PDF Files
  • ZIP Files

How to buy

See Also

Other related products and resources.

Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under GPL/LGPL, see source code files for details.