ardineer999
Published

Interfacing 16*2 LCD display with Arduino

LCDs (Liquid Crystal Displays) are used in embedded system applications for displaying various parameters and status of the system.

BeginnerProtip1,297
Interfacing 16*2 LCD display with Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
RGB LCD Shield Kit, 16x2 Character Display
RGB LCD Shield Kit, 16x2 Character Display
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Schematics

Schematic

Code

Code

C/C++
Download LiquidCrystal.h library from github/browser
#include <LiquidCrystal.h>
/* Create object named lcd of the class LiquidCrystal */
LiquidCrystal lcd(13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3);	/* For 8-bit mode */
//LiquidCrystal lcd(13, 12, 11, 6, 5, 4, 3);	/* For 4-bit mode */

unsigned char Character1[8] = { 0x04, 0x1F, 0x11, 0x11, 0x1F, 0x1F, 0x1F, 0x1F };	/* Custom Character 1 */
unsigned char Character2[8] = { 0x01, 0x03, 0x07, 0x1F, 0x1F, 0x07, 0x03, 0x01 };	/* Custom Character 2 */

void setup() {
  lcd.begin(16,2);	/* Initialize 16x2 LCD */
  lcd.clear();	/* Clear the LCD */
  lcd.createChar(0, Character1);	/* Generate custom character */
  lcd.createChar(1, Character2);
}

void loop() {
  lcd.setCursor(0,0);	/* Set cursor to column 0 row 0 */
  lcd.print("Hello!!!!");	/* Print data on display */
  lcd.setCursor(0,1);  
  lcd.write(byte(0));	/* Write a character to display */
  lcd.write(1);
}

Credits

ardineer999

ardineer999

2 projects • 8 followers
Hello there! this is ardineer with some more project... if you wanna learn some of my prototypes, follow my channel

Comments