Nachfolgend die Kurzzusammenfassung, wie man das LCD Dicplay HD44780 an ein Arduino Diecimila anschließt. Dabei ist folgendes zu beachten: Wenn man in Arduino (Version 11) die LCD-Crystal-Library lädt empfiehlt es sich den folgenden Part in der Datei LiquidCrystal.cpp auszukommentieren und dannach unter gleichem Namen im Verzeichnis arduinohome/hardware/libraries/LiquidCrystal zu speichern (ansonsten wird beim Kompilieren ein Fehler ausgegeben):
/*
extern void pinMode(int, int);
extern void digitalWrite(int, int);
extern int digitalRead(int);
extern void portMode(uint8_t, uint8_t);
extern void portWrite(uint8_t, uint8_t);
extern uint8_t portRead(uint8_t);
*/
Nachfolgend die Pin-Belegung (links Arduino, rechts das LCD-Display)
5V <=> Pin 2
5V <=> PIN 15
GND <=> PIN 16
GND <=> PIN 1
Pin 2 <=> PIN 6
PIN 3 <=> PIN 7
PIN 4 <=> PIN 8
PIN 5 <=> PIN 9
PIN 6 <=> PIN 10
PIN 7 <=> PIN 11
PIN 8 <=> PIN 12
PIN 9 <=> PIN 13
PIN 10 <=> PIN 14
PIN 11 <=> PIN 5
PIN 12 <=> PIN 4
zur Steuerung des Kontrastes einen Poti benutzen (PIN A, PIN B, PIN C):
PIN A <=> +5V
PIN B <=> GND
PIN C <=> PIN 3 (HD44780)
Arduino hat außerdem einen sitzen – und zwar auf PIN 13 eine Kontroll-LED.
Codebeispiel aus der Arduino Referenzseite:
#include
//include LiquidCrystal library
LiquidCrystal lcd = LiquidCrystal(); //create a LiquidCrystal object to control an LCD
char string1[] = “Hello!”; //variable to store the string “Hello!”
void setup(void){
lcd.init(); //initialize the LCD
digitalWrite(13,HIGH); //turn on an LED for debugging
}
void loop(void){
lcd.commandWrite(2); //bring the cursor to the starting position
delay(1000); //delay 1000 ms to view change
lcd.printIn(string1); //send the string to the LCD
delay(1000); //delay 1000 ms to view change
} //repeat forever
- Bild A
- Bild B
- Bild C
- Bild D




