LCD (Liquid Crystal Display) 16x2
is used to display ASCII characters. LCD is very impressive and attractive for
any Arduino Project or any controller project. We can display direct text
(ASCII) Alphabets and digits on it and can display function type values also, simply
there are techniques to display your text on LCD. Here we are displaying just
simple text to show interfacing and simple steps in Arduino IDE coding. Arduino
IDE also has built-in examples in which you can modify but have understanding when
you want to use in your own project and may this built-in example not fit for
that. Here we are giving you understanding.
Application:
Display Characters in ASCII
format
Display text, digits, etc.
Components:
Arduino IDE (Compiler software)
Computer for programming
Pot-meter: Use to control the contrast
of LCD
Circuit:
Coding:
/// LCD Display ///
///
ElktronicsGarage1.blogspot.com ///
/*LCD D7 to D4 - Arduino Uno
Pin 2-5
LCD EN - Arduino Uni pin 6
LCD RS - Arduino Uni pin 7
LCD D3 to D0 and RW and Vss
Ground connected
Vdd with Vcc and VEE use to
control the contrast
*/
// include the library code:
#include <LiquidCrystal.h>
// LCD PINs
const int rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// Initialize LCD 16x2
lcd.begin(16, 2);
}
void loop() {
// set the cursor to column 0, line 1
lcd.setCursor(0, 0);
// print the number of seconds since reset:
lcd.print("ElektronicGarage");
delay(100);
lcd.setCursor(0, 1);
lcd.print(" Fayyaz Hussain "); delay(100);
}
No comments:
Write commentsI am very thankful for your precious time