Liquid Crystal Display - Arduino

 

Arduino - Parallel LCD

The Hitachi HD44789 Controller (or its equivalent) is at the heart of virtually every alpha-numeric LCD display there is. Arduino has a "LiquidCrystal" library to talk directly to these displays.

ArduinoGnd5v-D12-D11-- --D5D4D3D2--
LCD12345678 910111213141516
Vss
(0v)
Vdd
(+5v)
VoRSR/W
0v
EDB0DB1 DB2DB3DB4DB5DB6DB7LEDA
+5v via 220R
LEDK
0v

 


Based on Arduino Liquid Crystal Tutorial....


#include <LiquidCrystal.h>

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

void setup() {

 // Create alien array with alien face

  byte alien[8] = {                
         31, 21, 31, 31, 10, 10, 27, 0
      };
  lcd.createChar(1, alien);    

  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("hello, world! ");

  // print the custom character
  lcd.write(1);
}

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);
}

 

Back to Index

This site and its contents are © Copyright 2005 - All Rights Reserved.