LCD 16×2 1602 DISP32

Fr5,950

This is a basic 16 character by 2 line Yellow Back light display.

Out of stock

SKU: 68CPN Category: Tag:

Description

LCD stands for Liquid Crystal Display. This is a basic 16 character by 2 line display Yellow Back light . Utilizes the extremely common HD44780 parallel interface chipset.  You will need 7 general I/O pins(If use in 4-bit Mode) to interface to this LCD screen. Includes LED backlight.

Features:

  • LCD display module with Yellow Backlight
  • SIZE : 16×2 (2 Rows and 16 Characters Per Row)
  • Can display 2-lines X 16-characters
  • Operate with 5V DC
  • Wide viewing angle and high contrast
  • Built-in industry standard HD44780 equivalent LCD controller
  • Commonly Used in: Student Project, Collage,copiers, fax machines, laser printers, industrial test equipment, networking equipment such as routers and storage devices
  • LCM type: Characters

How to get started with LCD 16×2

introduction

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16×2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on. A 16×2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5×7 pixel matrix. This LCD has two registers, namely, Command and Data. The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD.

overview

 Pin No
 Function
 Name
1
Ground (0V)
Ground
2
Supply voltage; 5V (4.7V – 5.3V)
 Vcc
3
Contrast adjustment; through a variable resistor
 VEE
4
Selects command register when low; and data register when high
Register Select
5
Low to write to the register; High to read from the register
Read/write
6
Sends data to data pins when a high to low pulse is given
Enable
7
8-bit data pins
DB0
8
DB1
9
DB2
10
DB3
11
DB4
12
DB5
13
DB6
14
DB7
15
Backlight VCC (5V)
Led+
16
Backlight Ground (0V)
Led-

In this tutorial you will learn how to use LCD 16×2 display (and 20×4) with Arduino uno. Also you will learn how to display live data from a sensor. In our case we are going to use a DHT22 temperature and humidity sensor.

Parts needed:

Before we starting Uploading Arduino sketches, We must do the following hardware connection.

The connections are easy, see the image above with the breadboard circuit schematic.

Arduino library and sample code

After making the circuit as shown above we are going to download Adafruits’s DHT library from their github page. To download, click the DOWNLOADS button in the top right corner. Rename the uncompressed folder DHT and make sure that it contains the dht.cpp file and others. Then drag the DHT folder into the arduinosketchfolder/libraries/ folder. You may have to create that libraries sub-folder if it doesn’t exist. Restart the IDE. MPORTANT: As of version 1.3.0 of the DHT library you will also need to install the Adafruit_Sensor library, which is available from the Arduino library manager. Another library we will use comes with any Arduino IDE nomatter what the version you have. After installing the libraries, it’s time for testing our LCD and DHT22 temperature sensor.

Testing our DHT22 temperature sensor 

if you made the circuit well as in the schematic upload this sketch to your Arduino UNO board and open your serial monitor at a baud rate speed equal to 9600.

Yourserial monitor should print the temperature and humidity of the room you are into ( if you’re into a room like I am, you can go outside also to see if the DHT22 will show you different value). The value are presented both in degree Celsius and degree Fahrenheit. The value heat point is the temperature we feel while the temperature is the actual thermometer reading.

Testing our LCD 16×2

Before you download and upload the following sketch you must be familiar with basic functions used in this sketch. I explained three of them but there are other many functions you can use, just google them and you will find a bunch of them.

The lcd.begin(16,2) command set up the LCD number of columns and rows,  if you have an LCD with 20 columns and 4 rows (20×4) you will have to change this to lcd.begin(20×4).

The lcd.print(“–message–“) command print a message to first column and row of lcd display. The “message” must have maximum length equal to lcd columns number. For example, for 16 columns display max length is equal with 16 and for 20 columns display max length is equal with 20.

The lcd.setCursor(0,1) command will set cursor to first column of second row.  If you have an LCD 20×4 and you want to print a message to column five and third row you have to use: lcd.setCursor(4,2).

You can keep playing with that by clicking the “Edit” button and start making your own modifications to the code. For example, try to change message on first and second row. You have successfully completed one more Arduino “How to” tutorial and you learned how to use an LCD display with Arduino uno.

Resources:

Arduino Library:

Adafruit DHT library

Adafruit Sensor library

Arduino sketches:

DHT22_temperature Sketch

LCD_test_16x2 sketch