Pollin WDC2704 Display am Arduino im 4 Bit-Mode

Hallo zusammen, da ich nun selbst das Problem lösen konnte, hier die Anleitung für die Nachwelt.
Bei Pollin gab es mal das WDC2740 Display preiswert zu kaufen.
Eine einfache Ansteuerung des Displays über die LCDLib und 4 Bit scheiterte im ersten Anlauf.

Lösung: Das Display ist intern 2 Displays , die Anschlussleitungen müssen sehr kurz gehalten werden, Datenleitungen und RS über 100Ohm entkoppeln, Initialisierung als 40×2-Display, obwohl nur 27×2 sichtbar sind….. viele Stolperfallen eben.

Hier die Beschaltung:

LCD / Arduino

R/W auf Masse direkt am Display
LCD RS über 100R auf Arduino D13
LCD ENA2 auf Arduino D12
LCD ENA1 auf Arduino D11
LCD D07 über 100R auf Arduino D10
LCD D06 über 100R auf Ardiono D09
LCD D05 über 100R auf Arduino D08
LCD D04 über 100R auf Ardiono D07

Ansteuerung dann:

#include <LiquidCrystal.h>
// we need 2 LCD-Instances
LiquidCrystal lcd1(13, 11, 7,8,9,10);
LiquidCrystal lcd2(13, 12, 7,8,9,10);

void setup() {
// set up the LCD’s number of columns and rows:
// Internally they are 40×2 controlers, but the physical display is 27×2
lcd1.begin(40, 2);
lcd2.begin(40, 2);
// Print a message to the LCD.
delay(1000);
lcd1.print(„LCD1 Hello World“);
delay(2);
lcd2.print(„LCD2 Hello World, too“);
delay(2);
}

void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd1.setCursor(0, 1);
// print the number of seconds since reset:
lcd1.print(„LCD1 “ + String (millis()/1000));

lcd2.setCursor(0, 1);
lcd2.print(„LCD2 “ + String (millis()/1000) );
delay(20);
}

 


Posted

in

by

Tags:

Comments

Schreibe einen Kommentar