summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreas 'randy' weinberger <vdr@smue.org>2010-04-23 16:17:07 +0200
committerandreas 'randy' weinberger <vdr@smue.org>2010-04-23 16:17:07 +0200
commit57729cf285b058d192a60bd7fce1b2d29bdd9650 (patch)
treead5fd8b59c50a9473f9ec4f7cac12818310c1e52
parent19f5069a27d4ce0e8e53a2a7f47fb68dc1413e37 (diff)
downloadgraphlcd-base-color.tar.gz
graphlcd-base-color.tar.bz2
added additional wiring for GU256x64-372 drivercolor
(thanks to mentox, http://www.vdr-portal.de/board/thread.php?postid=895721#post895721) http://projects.vdr-developer.org/issues/show/319
-rw-r--r--HISTORY3
-rw-r--r--README2
-rw-r--r--docs/DRIVER.gu256x64-37234
-rw-r--r--glcddrivers/gu256x64-372.c69
-rw-r--r--glcddrivers/gu256x64-372.h7
-rw-r--r--graphlcd.conf6
6 files changed, 105 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index 88eb96f..6835f2e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,9 @@
GraphLCD base package Revision History
--------------------------------------
+2010-04-23: version 0.1.6_1
+- added additional wiring for GU256x64-372 driver (thanks to mentox, http://www.vdr-portal.de/board/thread.php?postid=895721#post895721)
+
2010-03-01: Version 0.1.6
- added LDFLAGS_diff in Makefiles for better combat
- added gcc43-compat patch (include cstring.h/csdtlib.h)
diff --git a/README b/README
index 98b89e2..3256627 100644
--- a/README
+++ b/README
@@ -46,7 +46,7 @@ controllers/modules:
- Epson SED1520 (only tested with DIP122 lcd module)
- Epson SED1330
- Noritake GU140X32F-7806
- - Noritake GU256X64-372
+ - Noritake GU256X64-372, GU256X64-352 & GU256X64-355
- Noritake GU256X64-3XX0 (serial or parallel)
- Noritake GU126x64D-K610A4 displays (parallel)
- Noritake 800 series displays
diff --git a/docs/DRIVER.gu256x64-372 b/docs/DRIVER.gu256x64-372
index b840137..d9dfa78 100644
--- a/docs/DRIVER.gu256x64-372
+++ b/docs/DRIVER.gu256x64-372
@@ -7,14 +7,19 @@ The GU256X64-372 driver
Description
-----------
The GU256X64-372 driver supports Noritake GU256x64-372 VFD displays.
+Also, GU256x64-355 and GU256x64-352 are reported to work.
The VFD is operating in its 8 bit-mode connected to a PC's parallel
port.
-Wiring
+Wirings
------
-The GU256x64-372 driver supports the following connection on a parallel
-port:
+The GU256x64-372 driver supports the following connections on a
+parallel port:
+ - Standard
+ - Windows (used by lcdinfo)
+
+Standard wiring:
printerport LCD other
----------- ---------- ----------
@@ -32,6 +37,24 @@ port:
GND (18) CSS (23) (Chip Select)
GND (18) GND (02) (Ground)
+Windows wiring:
+
+ printerport LCD other
+ ----------- ---------- ----------
+ nSTRB (01) nWR (17) (Write)
+ D0 (02) D0 (15) (Data Bit 0)
+ D1 (03) D1 (13) (Data Bit 1)
+ D2 (04) D2 (11) (Data Bit 2)
+ D3 (05) D3 (09) (Data Bit 3)
+ D4 (06) D4 (07) (Data Bit 4)
+ D5 (07) D5 (05) (Data Bit 5)
+ D6 (08) D6 (03) (Data Bit 6)
+ D7 (09) D7 (01) (Data Bit 7)
+ nAUTO (14) nRD (21) (Read)
+ nSEL (17) R/S (19) (Register Select, C/D)
+ GND (18) CSS (23) (Chip Select)
+ GND (18) GND (02) (Ground)
+
Configuration Parameters
------------------------
@@ -94,3 +117,8 @@ RefreshDisplay
Possible values: 0 <= x <= 50
Default value: 5
+Wiring
+ Select the type of wiring your display is connected with.
+ Possible values: 'Standard', 'Windows'
+ Default value: 'Standard'
+
diff --git a/glcddrivers/gu256x64-372.c b/glcddrivers/gu256x64-372.c
index 30153e9..57ec981 100644
--- a/glcddrivers/gu256x64-372.c
+++ b/glcddrivers/gu256x64-372.c
@@ -64,10 +64,22 @@ namespace GLCD
#define BRIGHT_3 0x1A // luminance level 3 75.0%
#define BRIGHT_4 0x1B // luminance level 4 62.5%
-#define WRHI 0x04 // INIT
-#define WRLO 0x00
-#define CDHI 0x00 // nSEL
-#define CDLO 0x08
+static const std::string kWiringStandard = "Standard";
+static const std::string kWiringWindows = "Windows";
+
+const unsigned char kStandardWRHI = 0x04; // 16 / INIT
+const unsigned char kStandardWRLO = 0x00; //
+const unsigned char kStandardRDHI = 0x00; //
+const unsigned char kStandardRDLO = 0x00; //
+const unsigned char kStandardCDHI = 0x00; // 17 / nSELECT
+const unsigned char kStandardCDLO = 0x08; //
+
+const unsigned char kWindowsWRHI = 0x00; // 01 / nSTRB
+const unsigned char kWindowsWRLO = 0x01; //
+const unsigned char kWindowsRDHI = 0x00; // 14 / nLINEFEED
+const unsigned char kWindowsRDLO = 0x02; //
+const unsigned char kWindowsCDHI = 0x00; // 17 / nSELECT
+const unsigned char kWindowsCDLO = 0x08; //
cDriverGU256X64_372::cDriverGU256X64_372(cDriverConfig * config)
@@ -99,11 +111,44 @@ int cDriverGU256X64_372::Init()
height = 64;
m_iSizeYb = (height + 7) / 8;
+ // default values
+ WRHI = kStandardWRHI;
+ WRLO = kStandardWRLO;
+ RDHI = kStandardRDHI;
+ RDLO = kStandardRDLO;
+ CDHI = kStandardCDHI;
+ CDLO = kStandardCDLO;
+
for (unsigned int i = 0; i < config->options.size(); i++)
{
- if (config->options[i].name == "")
+ if (config->options[i].name == "Wiring")
{
- }
+ if (config->options[i].value == kWiringStandard)
+ {
+ WRHI = kStandardWRHI;
+ WRLO = kStandardWRLO;
+ RDHI = kStandardRDHI;
+ RDLO = kStandardRDLO;
+ CDHI = kStandardCDHI;
+ CDLO = kStandardCDLO;
+ syslog(LOG_DEBUG, "%s: using standard wiring\n");
+ }
+ else if (config->options[i].value == kWiringWindows)
+ {
+ WRHI = kWindowsWRHI;
+ WRLO = kWindowsWRLO;
+ RDHI = kWindowsRDHI;
+ RDLO = kWindowsRDLO;
+ CDHI = kWindowsCDHI;
+ CDLO = kWindowsCDLO;
+ syslog(LOG_DEBUG, "%s: using windows wiring\n");
+ }
+ else
+ {
+ syslog(LOG_ERR, "%s error: wiring %s not supported, using default (Standard)!\n",
+ config->name.c_str(), config->options[i].value.c_str());
+ }
+ }
}
// setup linear lcd array
@@ -277,12 +322,12 @@ void cDriverGU256X64_372::GU256X64Cmd(unsigned char data)
if (m_bSleepIsInit)
nSleepInit();
- port->WriteControl(CDHI | WRHI);
+ port->WriteControl(CDHI | WRHI | RDLO);
port->WriteData(data);
nSleep(100 + (100 * config->adjustTiming) - m_nTimingAdjustCmd);
- port->WriteControl(CDHI | WRLO);
+ port->WriteControl(CDHI | WRLO | RDLO);
nSleep(100 + (100 * config->adjustTiming) - m_nTimingAdjustCmd);
- port->WriteControl(CDHI | WRHI);
+ port->WriteControl(CDHI | WRHI | RDLO);
nSleep(100 + (100 * config->adjustTiming) - m_nTimingAdjustCmd);
}
@@ -291,12 +336,12 @@ void cDriverGU256X64_372::GU256X64Data(unsigned char data)
if (m_bSleepIsInit)
nSleepInit();
- port->WriteControl(CDLO | WRHI);
+ port->WriteControl(CDLO | WRHI | RDLO);
port->WriteData(data);
nSleep(100 + (100 * config->adjustTiming) - m_nTimingAdjustCmd);
- port->WriteControl(CDLO | WRLO);
+ port->WriteControl(CDLO | WRLO | RDLO);
nSleep(100 + (100 * config->adjustTiming) - m_nTimingAdjustCmd);
- port->WriteControl(CDLO | WRHI);
+ port->WriteControl(CDLO | WRHI | RDLO);
nSleep(100 + (100 * config->adjustTiming) - m_nTimingAdjustCmd);
}
diff --git a/glcddrivers/gu256x64-372.h b/glcddrivers/gu256x64-372.h
index f685f7d..7d92561 100644
--- a/glcddrivers/gu256x64-372.h
+++ b/glcddrivers/gu256x64-372.h
@@ -48,6 +48,13 @@ class cDriverGU256X64_372 : public cDriver
int CheckSetup();
+ int WRHI;
+ int WRLO;
+ int RDHI;
+ int RDLO;
+ int CDHI;
+ int CDLO;
+
protected:
void ClearVFDMem();
void SetPixel(int x, int y);
diff --git a/graphlcd.conf b/graphlcd.conf
index fe26eb0..2b0e784 100644
--- a/graphlcd.conf
+++ b/graphlcd.conf
@@ -179,6 +179,12 @@ Device=/dev/parport0
#AdjustTiming=0
#RefreshDisplay=1
+# Wiring
+# Select the type of wiring your display is connected with.
+# Possible values: 'Standard', 'Windows'
+# Default value: 'Standard'
+Wiring=Standard
+
########################################################################
[gu256x64-3900]