LCD Display usage (LiquidCrystal library)
 
It is really easy to use a LCD display that is compatible with the Liquid Crystal library (this library is already included in the Arduino software kit).
The wiring can be done as you wish, just declare the wiring in the program code below the right way! In my example:
Display Pin - Arduino Pin:
(1) Vss - GND
(2) Vdd - +5V
(4) RS - Digital #12
(5) RW - GND
(6) EN - Digital #11
(11) DB4 - Digital #10
(12) DB5 - Digital #7
(13) DB6 - Digital #6
(14) DB7 - Digital #5
Please note that the Displays Pins 4,6 through 14 are the inital parameters for the function LiquidCrystal():

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

// initialize the library with the numbers of the interface pins
// RS 12
// EN 11
// DB4 10
// DB5 7
// DB6 6
// DB7 5
LiquidCrystal lcd(12, 11, 10, 7, 6, 5);

void setup() {
 // set up the LCD's number of rows and columns:
 lcd.begin(8, 2);
 // Print a message to the LCD.
 lcd.print("1-2-3-4-");
 lcd.setCursor(0, 1);
 lcd.print("5-6-7-8-");
}

void loop() {

}

In the above example, a 8x2 display is used (8 characters, 2 rows).

More information:
- http://www.ladyada.net/learn/lcd/charlcd.html
 
admin / Dec 09, 2009
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2019 / lookass.ch
makememad@lookass.ch