The LCD module makes an embedded system completely independent with which can take analog or digital input on its input pins and display the corresponding output in its own screen along with generating other kind of outputs. The LCD modules comes in different sizes varies from single line monochrome display to large graphical color display all of them using almost same method for displaying data. The Arduino can be used as a stand-alone board of which the output or inputs can be taken from the boards or given to the board. The Arduino board even though has various kinds of communication ports they can’t match with the effectiveness provided by the LCD module. Moreover the LCD module eliminates the requirement for having a PC or any other kind of devices connected with the Arduino board to display the data send by the board.
The Arduino board has all the required circuitary to get the built-in AVR microcontroller running. It has also pins which can be configure as digital output only, digital or analog output, digital input only and digital or analog input. Any AVR microcontroller based board which follows the standard Arduino schematic and is flashed with the Arduino bootloader can be called an Arduino board. The Arduino IDE is also very simple that anyone who have basic knowledge of c programming can quickly get started with it. The tutorial on Getting started with the Arduino explains about the steps required to get start with an Arduino board.
Project Source Code
###
/*============================EG LABS ===================================//Demonstration on how to use 16*2 LCD with an arduino boardThe circuit:LCD:* 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 pin 3* LED anode attached to digital output 6* LED cathode attached to ground through a 1K resistorAnalog input:* Potentiometer attached to analog input A0* one side pin (either one) to ground* the other side pin to +5V* LED anode (long leg) attached to digital output 6* LED cathode (short leg) attached to ground through a 1K resistor//============================ EG LABS ===================================*///include the library code:#include <LiquidCrystal.h> //initialize the library with the numbers of the interface pinsLiquidCrystal lcd(12, 11, 5, 4, 3, 2);const int analogInPin = A0; // Analog input pin that the potentiometer is attached toconst int analogOutPin = 6; // Analog output pin that the LED is attached tointpotvalue = 0;intoutputvalue=0;void setup(){// set up the LCD's number of columns and rows:lcd.begin(16, 2);lcd.print("ENGINEERS GARAGE");}void loop(){// read the analog in value:potvalue = analogRead(analogInPin); // map it to the range of the analog out:outputvalue = map(potvalue, 0, 1023, 0, 255);lcd.setCursor(7, 2);lcd.print((outputvalue * 5)/255);lcd.print("V"); // change the analog out value:analogWrite(analogOutPin, outputvalue);delay(100) ;}###
Circuit Diagrams
Project Components
Project Video
Filed Under: Arduino Projects
Filed Under: Arduino Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.