Wednesday, 13 August 2014

12 x 16 Characters Display interfacing with Arduino Uno

12 x 16 Characters Display interfacing with Arduino Uno

This example shows how to interface a 2 x 16 Characters LCD Display with an Arduino UNO

Hardware required

·         Arduino Board
·         Potentiometer
·         JHD 162a LCD Display
·    Some of the jumper wires

Circuit
To build this circuit, a JHD 162a 2 x 16 Character LCD Display is wired up with an Arduino Uno as shown in the Schematic and a potentiometer of 2K ohm is also connected with the LCD Display, this is being used to adjust the brightness of theback light in the LCD Display. Then plug your Arduino board into your computer, and enter the code below

Schematic

Code
/*
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/JHD 162a drivers.
 This sketch prints "Hello World!" into 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
* 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)

 */

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

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

void setup() {
  // 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);
}

1 comment:

  1. If you had financial problems, then it is time for you to smile. You only need to contact Mr. Benjamin  with the amount you wish to borrow at the low rate of 2% ROI and the payment period that suits you and you will have your loan  within three working days. I just benefited for the sixth time a loan of 700 thousand dollars for a period of 180 months with the possibility of paying before the expiration date. Mr Benjamin has been helping me with the loan.Make contact with him and you will see that he is a very honest man with a good heart.His email is  247officedept@gmail.com   and his WhatApp phone number is + 1-989-394-3740 .

    ReplyDelete