sed1330 update & extension (Benjamin Wiedmann)
This commit is contained in:
@@ -24,6 +24,7 @@ v.0.5dev (ongoing development)
|
||||
* make Brightness & OffBrightness run-time configurable in CFontz & MtxOrb
|
||||
* add support for Iface and ProcSize screens for OS X / Darwin (Eric Pooch)
|
||||
* update & fix serialVFD driver (Stefan Herdler)
|
||||
+ Hitachi SP14Q002 support & another connection type to sed1330 (Benjamin Wiedmann)
|
||||
|
||||
v.0.5.1
|
||||
+ config file support in lcdproc client (Andrew Foss)
|
||||
|
||||
@@ -697,10 +697,12 @@ Device=/dev/ttyUSB0
|
||||
# Port where the LPT is. Common values are 0x278, 0x378 and 0x3BC
|
||||
Port=0x378
|
||||
|
||||
# Type of LCD module (legal: G321D, G121C, G242C, G191D, G2446)
|
||||
# Note: G321D is the only one that is tested currently.
|
||||
# Type of LCD module (legal: G321D, G121C, G242C, G191D, G2446, SP14Q002)
|
||||
# Note: Currently only tested with G321D & SP14Q002.
|
||||
Type=G321D
|
||||
|
||||
# Width x Height of a character cell in pixels (legal: 6x7 - 8x16; default: 6x10)
|
||||
CellSize=6x10
|
||||
|
||||
|
||||
## Seiko Epson 1520 driver ##
|
||||
|
||||
@@ -11,6 +11,8 @@ Things for the short term:
|
||||
- more features for existing display drivers
|
||||
(e.g. adapt them to bignum library)
|
||||
- documentation (any help is appreciated)
|
||||
- ConnectionType configuration parameter for the sed1330 driver to
|
||||
distinguish between the default and bitshaker (a.k.a. yasedw) wiring
|
||||
|
||||
Things for the longer term:
|
||||
|
||||
|
||||
@@ -2,10 +2,150 @@
|
||||
<title>The sed1330 Driver</title>
|
||||
|
||||
<para>
|
||||
This section talks about using LCDproc with LCD displays that use the
|
||||
sed1330 chipset.
|
||||
This section talks about using LCDproc with graphical LCD displays driven by
|
||||
the EPSON/SMOS SED1330 or SED1335 LCD controllers, which may also be known by their
|
||||
new names: S1D13300 (= SED1330) and S1D13305 (SED1335).
|
||||
|
||||
The displays are driven in text mode using their built-in character generator.
|
||||
</para>
|
||||
|
||||
<sect2 id="sed1330-connections">
|
||||
<title>Connections</title>
|
||||
|
||||
<para>
|
||||
Connections below are for the G242C, G121C and G321D displays.
|
||||
Always consult documentation about the specific display before asuming
|
||||
the connections given here are also correct for your display !
|
||||
</para>
|
||||
|
||||
|
||||
Ordered by LCD pins
|
||||
<screen>
|
||||
<![CDATA[
|
||||
LCD pin? <---> pin LPT port
|
||||
^RESET 1 1 ^STROBE
|
||||
^RD 2 +5V
|
||||
^WR 3 16 ^INIT
|
||||
SEL1 4 GND
|
||||
SEL2 5 GND
|
||||
^CS 6 GND
|
||||
A0 7 17 ^SELECT_IN
|
||||
D0 8 2 D0
|
||||
D1 9 3 D1
|
||||
D2 10 4 D2
|
||||
D3 11 5 D3
|
||||
D4 12 6 D4
|
||||
D5 13 7 D5
|
||||
D6 14 8 D6
|
||||
D7 15 9 D7
|
||||
Vdd 16 +5V
|
||||
Vss 17 GND 18..25 GND
|
||||
V0 18 potmeter
|
||||
Vlc 19 -24V
|
||||
Frame 20 GND
|
||||
10 ^ACK
|
||||
GND 11 BUSY
|
||||
12 PAPEREND
|
||||
13 ^SELECT
|
||||
14 ^LF
|
||||
15 ^ERROR
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
Or ordered by the LPT port pins:
|
||||
<screen>
|
||||
<![CDATA[
|
||||
LCD pin? <---> pin LPT port
|
||||
^RESET 1 1 ^STROBE
|
||||
D0 8 2 D0
|
||||
D1 9 3 D1
|
||||
D2 10 4 D2
|
||||
D3 11 5 D3
|
||||
D4 12 6 D4
|
||||
D5 13 7 D5
|
||||
D6 14 8 D6
|
||||
D7 15 9 D7
|
||||
10 ^ACK
|
||||
GND 11 BUSY
|
||||
12 PAPEREND
|
||||
13 ^SELECT
|
||||
14 ^LF
|
||||
15 ^ERROR
|
||||
^WR 3 16 ^INIT
|
||||
A0 7 17 ^SELECT_IN
|
||||
Vss 17 GND 18..25 GND
|
||||
^RD 2 +5V
|
||||
SEL1 4 GND
|
||||
SEL2 5 GND
|
||||
^CS 6 GND
|
||||
Vdd 16 +5V
|
||||
V0 18 potmeter
|
||||
Vlc 19 -24V (not required for G242C)
|
||||
Frame 20 GND
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
The potmeter should be connected like this on these display modules:
|
||||
|
||||
<screen>
|
||||
<![CDATA[
|
||||
=== GND
|
||||
|
|
||||
.-.
|
||||
| |
|
||||
| |5k
|
||||
'-'
|
||||
|
|
||||
|
|
||||
.-.10k potmeter
|
||||
| |
|
||||
| |<----------------o V0
|
||||
| |
|
||||
'-'
|
||||
|
|
||||
O Vlc (= -24V)
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
The G242C generates -24V internally. It is available on Vlc.
|
||||
|
||||
To generate -24 from the +5V without an external power source, you can
|
||||
use the following circuit.
|
||||
|
||||
<screen>
|
||||
<![CDATA[
|
||||
5V O------+----------+ pinout:
|
||||
| | _____
|
||||
| --- 100uF | _ |
|
||||
| --- 10V | (_) | <-3
|
||||
| | |_____|
|
||||
| +--------+--------+--------+ | max |
|
||||
|5 | | | | | 724 |
|
||||
--------- === GND C - | |_____|
|
||||
| | C coil | | | |||||
|
||||
| | C 47uH | |10k | |||||.
|
||||
| |4 | - | | | |
|
||||
| MAX724 |--------------+ | | 12345
|
||||
| or | | | |
|
||||
| MAX726 |1 | | |+
|
||||
| |-----------------------+ --- 47uF
|
||||
| | | | --- 50V
|
||||
| | | | |
|
||||
--------- | - |
|
||||
|2 |3 | | | |
|
||||
| | '---, | |1k |
|
||||
--- | SB160 / \ - |
|
||||
100nF--- | ^T^ | |
|
||||
| | | | |
|
||||
+-----+----------------+--------+--------+----O -24V out
|
||||
]]>
|
||||
</screen>
|
||||
|
||||
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<!-- ## Seiko Epson 1330 driver ## -->
|
||||
<sect2 id="sed1330-config">
|
||||
<title>Configuration in LCDd.conf</title>
|
||||
@@ -14,6 +154,24 @@ sed1330 chipset.
|
||||
<title>[sed1330]</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>CellSize=</command>
|
||||
<arg choice="plain">
|
||||
<replaceable>WIDTH</replaceable>
|
||||
<literal>x</literal>
|
||||
<replaceable>HEIGHT</replaceable>
|
||||
</arg>
|
||||
</term>
|
||||
<listitem><para>
|
||||
Specify the size of a character in pixels.
|
||||
<replaceable>WIDTH</replaceable> may vary between <literal>6</literal> and <literal>8</literal>;
|
||||
legal values for <replaceable>HEIGHT</replaceable> range from <literal>7</literal> to
|
||||
<literal>16</literal>.
|
||||
If not given <command>CellSize</command> defaults to <literal>6x10</literal>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>Port=</command>
|
||||
@@ -37,6 +195,7 @@ sed1330 chipset.
|
||||
<arg choice="plain"><literal>G242C</literal></arg>
|
||||
<arg choice="plain"><literal>G191D</literal></arg>
|
||||
<arg choice="plain"><literal>G2446</literal></arg>
|
||||
<arg choice="plain"><literal>SP14Q002</literal></arg>
|
||||
</group>
|
||||
</arg>
|
||||
</term>
|
||||
@@ -45,12 +204,18 @@ sed1330 chipset.
|
||||
Type of LCD module.
|
||||
</para>
|
||||
<note><para>
|
||||
The G321D is the only one that is tested currently.
|
||||
The G321D and SP14Q002 are the only ones that this driver is tested with currently.
|
||||
</para></note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<para>
|
||||
Contrary to other drivers the character size of an LCD is not given given directly.
|
||||
Instead it is determined by the pixel size of the display, which is derived from
|
||||
the display type setting and the character cell size.
|
||||
</para>
|
||||
|
||||
</sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
+85
-13
@@ -15,6 +15,7 @@
|
||||
*
|
||||
* Copyright (c) 2001-2003, Joris Robijn <joris@robijn.net>
|
||||
* 2003, Michael Rohde <Micha.R@online.de>
|
||||
* 2006, Benjamin Wiedmann <benjamin.wiedmann@gmx.net>
|
||||
*
|
||||
*
|
||||
* Changelog:
|
||||
@@ -41,6 +42,13 @@
|
||||
* - added function sed1330_icon to get correct display of full blocks
|
||||
* May 2003, Joris Robijn
|
||||
* - Made bars have spaces between them (I hope people like this)
|
||||
* December 2006, Benjamin Wiedmann
|
||||
* - added support for Hitachi SP14Q002 gLCD (320x240) with ccfl inverter
|
||||
* - built for parport version of this interface: Wallbraun Electronics lcdinterface
|
||||
* (specifications here: http://wallbraun-electronics.de/produkte/lcdinterface/index.html)
|
||||
* - wiring scheme used: "bitshaker" (called "yasedw" in serdisplib)
|
||||
* --> default wiring: wr=16; a0=17; rd=01; cs=14
|
||||
* --> yasedw wiring: wr=01; a0=14; rd=16; cs=17
|
||||
*
|
||||
*
|
||||
* IMPORTANT: MODULES OTHER THAN G321D
|
||||
@@ -173,11 +181,12 @@
|
||||
*
|
||||
* With the display= option you should specify what display module you have.
|
||||
* Accepted values are:
|
||||
* display=G121C
|
||||
* display=G242C
|
||||
* display=G321D
|
||||
* display=G191D
|
||||
* display=G2446
|
||||
* type=G121C
|
||||
* type=G242C
|
||||
* type=G321D
|
||||
* type=G191D
|
||||
* type=G2446
|
||||
* type=SP14Q002
|
||||
* The port= value should be set to the LPT port address that the LCD is
|
||||
* connected to. Examples:
|
||||
* port=0x378
|
||||
@@ -210,9 +219,33 @@
|
||||
#define KEYPAD_AUTOREPEAT_FREQ 15
|
||||
|
||||
// LPT lines
|
||||
|
||||
// should we use the bitshaker wiring?
|
||||
//#define WIRING_BITSHAKER
|
||||
|
||||
#ifdef WIRING_BITSHAKER
|
||||
|
||||
// use BITSHAKER / YASEDW wiring
|
||||
|
||||
// pin 14
|
||||
#define A0 nLF
|
||||
// pin 16
|
||||
#define nRESET INIT
|
||||
// pin 1
|
||||
#define nWR STRB
|
||||
|
||||
#else
|
||||
|
||||
// use default wiring
|
||||
|
||||
// pin 17
|
||||
#define A0 SEL
|
||||
#define nRESET STRB
|
||||
#define nWR INIT
|
||||
// pin 1
|
||||
#define nRESET STRB
|
||||
// pin 16
|
||||
#define nWR INIT
|
||||
|
||||
#endif
|
||||
|
||||
// Command definitions
|
||||
#define CMD_SYSTEM_SET 0x40
|
||||
@@ -237,11 +270,12 @@
|
||||
#define KEYPAD_MAXX 5
|
||||
#define KEYPAD_MAXY 8
|
||||
|
||||
#define TYPE_G321D 1
|
||||
#define TYPE_G121C 2
|
||||
#define TYPE_G242C 3
|
||||
#define TYPE_G191D 4
|
||||
#define TYPE_G2446 5
|
||||
#define TYPE_G321D 1
|
||||
#define TYPE_G121C 2
|
||||
#define TYPE_G242C 3
|
||||
#define TYPE_G191D 4
|
||||
#define TYPE_G2446 5
|
||||
#define TYPE_SP14Q002 6
|
||||
|
||||
#define SCR1_L 0x00 // Memory locations
|
||||
#define SCR1_H 0x00
|
||||
@@ -378,7 +412,10 @@ sed1330_init( Driver * drvthis )
|
||||
p->type = TYPE_G2446;
|
||||
p->graph_width = 240;
|
||||
p->graph_height = 64;
|
||||
|
||||
} else if(strcmp(s, "SP14Q002") == 0) {
|
||||
p->type = TYPE_SP14Q002;
|
||||
p->graph_width = 320;
|
||||
p->graph_height = 240;
|
||||
} else {
|
||||
report(RPT_ERR, "%s: Unknown display type %s", drvthis->name, s);
|
||||
return -1;
|
||||
@@ -498,6 +535,9 @@ sed1330_init( Driver * drvthis )
|
||||
case TYPE_G321D:
|
||||
data[4] = 0x38;
|
||||
break;
|
||||
case TYPE_SP14Q002:
|
||||
data[4] = 0x38;
|
||||
break;
|
||||
case TYPE_G121C:
|
||||
data[4] = 0x7F; // ? please confirm these numbers
|
||||
break;
|
||||
@@ -635,6 +675,38 @@ sed1330_height( Driver * drvthis )
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the width of a character in pixels.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \return Number of pixel columns a character cell is wide.
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
sed1330_cellwidth(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
debug(RPT_DEBUG, "%s: returning cellwidth", drvthis->name);
|
||||
|
||||
return p->cellwidth;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the height of a character in pixels.
|
||||
* \param drvthis Pointer to driver structure.
|
||||
* \return Number of pixel lines a character cell is high.
|
||||
*/
|
||||
MODULE_EXPORT int
|
||||
sed1330_cellheight(Driver *drvthis)
|
||||
{
|
||||
PrivateData *p = drvthis->private_data;
|
||||
|
||||
debug(RPT_DEBUG, "%s: returning cellheight", drvthis->name);
|
||||
|
||||
return p->cellheight;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Clear the framebuffer
|
||||
//
|
||||
|
||||
+16
-14
@@ -8,23 +8,25 @@
|
||||
|
||||
#include "lcd.h"
|
||||
|
||||
MODULE_EXPORT int sed1330_init( Driver * drvthis );
|
||||
MODULE_EXPORT void sed1330_close( Driver * drvthis );
|
||||
MODULE_EXPORT int sed1330_width( Driver * drvthis );
|
||||
MODULE_EXPORT int sed1330_height( Driver * drvthis );
|
||||
MODULE_EXPORT void sed1330_clear( Driver * drvthis );
|
||||
MODULE_EXPORT void sed1330_flush( Driver * drvthis );
|
||||
MODULE_EXPORT void sed1330_string( Driver * drvthis, int x, int y, char lcd[] );
|
||||
MODULE_EXPORT void sed1330_chr( Driver * drvthis, int x, int y, char c );
|
||||
MODULE_EXPORT int sed1330_init(Driver *drvthis);
|
||||
MODULE_EXPORT void sed1330_close(Driver *drvthis);
|
||||
MODULE_EXPORT int sed1330_width(Driver *drvthis);
|
||||
MODULE_EXPORT int sed1330_height(Driver *drvthis);
|
||||
MODULE_EXPORT int sed1330_cellheight(Driver *drvthis);
|
||||
MODULE_EXPORT int sed1330_cellwidth(Driver *drvthis);
|
||||
MODULE_EXPORT void sed1330_clear(Driver *drvthis);
|
||||
MODULE_EXPORT void sed1330_flush(Driver *drvthis);
|
||||
MODULE_EXPORT void sed1330_string(Driver *drvthis, int x, int y, char lcd[]);
|
||||
MODULE_EXPORT void sed1330_chr(Driver *drvthis, int x, int y, char c);
|
||||
|
||||
MODULE_EXPORT void sed1330_vbar( Driver * drvthis, int x, int y, int len, int promille, int pattern );
|
||||
MODULE_EXPORT void sed1330_hbar( Driver * drvthis, int x, int y, int len, int promille, int pattern );
|
||||
MODULE_EXPORT void sed1330_num( Driver * drvthis, int x, int y, int num );
|
||||
MODULE_EXPORT void sed1330_heartbeat( Driver * drvthis, int type );
|
||||
MODULE_EXPORT void sed1330_vbar(Driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
MODULE_EXPORT void sed1330_hbar(Driver *drvthis, int x, int y, int len, int promille, int pattern);
|
||||
MODULE_EXPORT void sed1330_num(Driver *drvthis, int x, int y, int num);
|
||||
MODULE_EXPORT void sed1330_heartbeat(Driver *drvthis, int type);
|
||||
// No cursor function: use software cursor to prevent flickering ! */
|
||||
MODULE_EXPORT int sed1330_icon( Driver * drvthis, int x, int y, int icon);
|
||||
MODULE_EXPORT int sed1330_icon(Driver *drvthis, int x, int y, int icon);
|
||||
|
||||
MODULE_EXPORT void sed1330_backlight( Driver * drvthis, int on );
|
||||
MODULE_EXPORT void sed1330_backlight(Driver *drvthis, int on);
|
||||
MODULE_EXPORT const char * sed1330_get_key(Driver *drvthis);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user