LCDproc development and user support list

Text archives Help


[Lcdproc] lcdproc-0.5.1 and serialized HD44780 on k-data wake-up 2.0 module


Chronological Thread 
  • From: peter AT adpm.de (Peter Marschall)
  • Subject: [Lcdproc] lcdproc-0.5.1 and serialized HD44780 on k-data wake-up 2.0 module
  • Date: Fri Jan 19 12:05:02 2007

Hi,

On Thursday, 18. January 2007 21:51, Bernd Büchs wrote:
> I got my wake-up 2.0 module <http://www.k-data.org/> working with patched
> lcdproc-0.4.5. I used the patch that can be found on
> <http://www.jepsennet.de/vdr/html/lcdproc.html>.
>
> I was using "ConnectionType=seriallcd" in that setting.
>
> For use of airlcd <http://airlcd.sourceforge.net/> I have upgraded to
> lcdproc-0.5.1. Unfortunately I did only get garbadge on my LCD (some words
> or part of it are readable, the backligth switchs randomly on and off). I
> experimented with different "ConnectionType" and other settings but nothing
> worked...
>
> Is there a chance to get the combination lcdproc-0.5.1 and serialized
> HD44780 on k-data wake-up 2.0 module working. May be I am missing just some
> nice setup data?!
>
> Was the patch from <http://www.jepsennet.de/vdr/html/lcdproc.html>
> converted and integrated to the current lcdproc, i.e. the new unified
> serial sub-driver for hd44780?

No, the patch has not been included into LCDproc 0.5.1 yet.
(Your mail is the first indication tat this patch exists ;-)

I have committed a first draft of the patch to the CVS.
It will be in tonight's (tomorrow's ) nightly tar ball

If you are impatient (such as me ;-), you may try the attached patch.

Features / Limitations:
- new ConnectionType=vdr-wakeup
- only supports LCDs with 1 HD44780
(i.e. on LCDs > 20x4 only parts of the screen will be visisble)
- no character mapping
- no "full redraw" support

Please test and report feedback.
Peter




--
Peter Marschall
peter AT adpm.de
--- serial/drivers/hd44780-serial.c	12 Sep 2006 16:23:25 -0000	1.5
+++ serial/drivers/hd44780-serial.c	19 Jan 2007 11:55:16 -0000
@@ -238,19 +238,21 @@
 serial_HD44780_senddata (PrivateData *p, unsigned char displayID, unsigned char flags, unsigned char ch)
 {
 	/* Filter illegally sent escape characters (for interfaces without data escape) */
-	if (flags == RS_DATA && SERIAL_IF.data_escape==0 && ch==SERIAL_IF.instruction_escape)
+	if (flags == RS_DATA && SERIAL_IF.data_escape == 0 && ch == SERIAL_IF.instruction_escape)
 		ch='?';
 
 	if (flags == RS_DATA) {
 		/* Do we need a DATA indicator byte? */
-		if( SERIAL_IF.data_escape!=0 && ch<SERIAL_IF.data_escape_max ) {
-			write( p->fd, &SERIAL_IF.data_escape, 1 );
+		if ((SERIAL_IF.data_escape != '\0') &&
+		    (ch >= SERIAL_IF.data_escape_min) &&
+		    (ch < SERIAL_IF.data_escape_max)) {
+			write(p->fd, &SERIAL_IF.data_escape, 1);
 		}
-		write( p->fd, &ch, 1 );
+		write(p->fd, &ch, 1);
 	}
 	else {
-		write( p->fd, &SERIAL_IF.instruction_escape, 1 );
-		write( p->fd, &ch, 1 );
+		write(p->fd, &SERIAL_IF.instruction_escape, 1);
+		write(p->fd, &ch, 1);
 	}
 }
 
--- serial/drivers/hd44780-serial.h	13 Aug 2006 15:55:48 -0000	1.1
+++ serial/drivers/hd44780-serial.h	19 Jan 2007 11:55:16 -0000
@@ -11,7 +11,8 @@
 	char         name[SERIALIF_NAME_LENGTH];
 	char         instruction_escape;
 	char         data_escape;
-	char         data_escape_max; /* data escape upper limit */
+	char         data_escape_min; /* escaped data lower limit */
+	char         data_escape_max; /* escaped data upper limit */
 	unsigned int default_bitrate;
 	char         if_bits;
 	char         keypad;
@@ -23,11 +24,12 @@
 /* List of connectiontypes managed by this driver, if you change
    something here, remember also to change hd44780-drivers.h */
 static const SerialInterface serial_interfaces[] = {
-	/*    name         instr data     ^ bitrate bits  K   esc  B  esc */
-	{"picanlcd",     0x11, 0x12, 0x20,   9600,   8, 0,    0, 0,   0 },
-	{"lcdserializer",  0xFE,    0,    0,   9600,   8, 0,    0, 0,   0 },
-	{"los-panel",      0xFE,    0,    0,   9600,   4, 1, 0xFE, 1,   0 },
-	{"vdr-lcd",        0xFE,    0,    0,   9600,   4, 0,    0, 0,   0 }
+	/*    name         instr data     v     ^ bitrate bits  K   esc  B  esc */
+	{ "picanlcd",      0x11, 0x12, 0x00, 0x20,   9600,   8, 0, 0x00, 0,   0 },
+	{ "lcdserializer", 0xFE,    0, 0x00, 0x00,   9600,   8, 0, 0x00, 0,   0 },
+	{ "los-panel",     0xFE,    0, 0x00, 0x00,   9600,   4, 1, 0xFE, 1,   0 },
+	{ "vdr-lcd",       0xFE,    0, 0x00, 0x00,   9600,   4, 0, 0x00, 0,   0 }
+	{ "vdr-wakeup",    0xC0, 0xC4, 0xC0, 0xD0,   9600,   4, 0, 0x00, 0,   0 }
 };
 
 /* initialize this particular driver */



Archive powered by MHonArc 2.6.18.

Top of page