How to Use A 16x2 LCD with arduino

How to Use A 16x2 LCD with arduino © GPL3+

Gonna show you how to use a LCD with arduino.

  • 1,080 views
  • 2 comments
  • 1 respect

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
For Soldering header pins to LCD

Apps and online services

About this project

Step 1 Solder The LCD:

Solder Header Pin's small pins facing upwards

Be careful and don't make any short circuits

Step 2 Assemble:

LCD pin1 => GND

LCD pin2 => 5v

LCD pin3 => D6

LCD pin4 => D12

LCD pin5 => GND

LCD pin6 => D11

LCD pin11 => D5

LCD pin12 => D4

LCD pin13 => D3

LCD pin14 => D2

LCD pin15 => 200 Ohms Resistor => 5v

LCD pin16 => GND

Step 3 Upload The Code:

You can go To The File>Example>LiquidCrystal> for some examples and add this code in the setup() function - analogWrite(6,20);

adding this line to any examples in the Library will work

Thank You ^_^

Support

Vote For Me Please

https://www.instructables.com/id/How-to-Make-Remote-Controlled-Bulb-With-Arduino/

https://www.instructables.com/id/How-to-Make-a-Parabolic-Microphone-With-an-Old-TV-/

https://www.instructables.com/id/How-to-Make-Secret-Drawer-Alarm/

Code

CodeArduino
Use this if yours doesn't work
/*
  LiquidCrystal Library - Hello World

 Demonstrates the use a 16x2 LCD display.  The LiquidCrystal
 library works with all LCD displays that are compatible with the
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.

 This sketch prints "Hello World!" to the LCD
 and shows the time.

  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
 * LCD VSS pin to ground
 * LCD VCC pin to 5V
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 22 Nov 2010
 by Tom Igoe

 This example code is in the public domain.

 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  analogWrite(6,20);  // Add this line to any example
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis() / 1000);
}

Schematics

schematics
Use this
projectsketch_Ogt7sr9mBD.fzz

Comments

Similar projects you might like

16x2 LCD Backpack with Enclosure for the Onion Omega

Project in progress by Carlos Silva

  • 7,977 views
  • 5 comments
  • 22 respects

Google Chrome Dinosaur Game on 16x2 LCD Shield

Project showcase by brzi

  • 24,019 views
  • 11 comments
  • 57 respects

Easily Wire a 16x2 LCD

Project showcase by ThomTronics

  • 8,833 views
  • 0 comments
  • 15 respects

Interfacing Nokia 5110 LCD with Arduino

by Aqib

  • 48,788 views
  • 3 comments
  • 19 respects
Add projectSign up / Login