Sie sind auf Seite 1von 3

Ausgeschlachtetes LCD

Das LCD aus einem defekten ISDN Telefon (AGFEO SysTel 30, LCD Modul Bezeichnung: TM244AD P-6) kann man wunderbar noch fr eigene Projekte nutzen.

Es hat 4 Zeilen mit 24 Spalten und wird von zwei eigenstndigen HD44780 kompatiblen Controllern angesteuert. Ein Controller steuert die oberen beiden Zeilen, der andere die unteren beiden Zeilen an. Die Auswahl eines Controllers geschieht etwas unblich ber einen Select Pin17 (0: obere Zeilen und 1: untere Zeilen)

Folgender Beispielcode zeigt die Ansteuerung mit einem Arduino:

#include < LiquidCrystal.h>

/* Example for usage of LCD found in ISDN Tel AgfeoSysTel ST30 ** Name of LCD Module: TM244AD P -6 ** It is a 4x24 Display with two Controlers. ** Normaly there are two enable pins on similar types of LCD's ** This one has a select pin. L ow enables controler for upper two lines. ** High enables controler for bottom two lines. ** ** Pins of LCD Modul: ** ** 1 GND

** 2 ** 3 ** 4 ** 5 ** 6

Vplus V contrast RS RW E DB0-DB7

** 7-14

** 15 V backlight ** 16 GND backlight ** 17 Select < ------- not so usual

** 18 Not connected */

#define SELECT_PIN 6 LiquidCrystallcd(7, 8, 9, 10, 11, 12);

voidselectTop() { digitalWrite(SELECT_PIN, LOW); } voidselectBottom() { digitalWrite(SELECT_PIN, HIGH); }

void setup() { pinMode(SELECT_PIN, OUTPUT);

// First init the controler for the top two lines selectTop(); // set up the LCD's number of columns and rows: lcd.begin(24, 2); lcd.print("Line1"); lcd.setCursor(0,1); lcd.print("Line2");

// Now init the controler for the bottom two lines selectBottom(); lcd.begin(24, 2); lcd.print("Line3"); lcd.setCursor(0,1);

lcd.print("Line4"); }

void loop() { selectBottom(); lcd.setCursor(15, 1); // print the number of seconds since reset: lcd.print(millis()/1000);

selectTop(); lcd.setCursor(10,0); lcd.print("Seconds"); lcd.setCursor(10,1); lcd.print("since Start"); }

/* vim:setfiletype=cpp: */

Das könnte Ihnen auch gefallen