LCDproc development and user support list

Text archives Help

[Lcdproc] Changes to get EA-DOGM163 + four keys working with hd44780-lcd2usb driver

Chronological Thread 
  • From: bsdfan at (Markus Dolze)
  • Subject: [Lcdproc] Changes to get EA-DOGM163 + four keys working with hd44780-lcd2usb driver
  • Date: Fri, 20 Feb 2009 18:54:16 +0100

-------- Original-Nachricht --------
> Datum: Fri, 20 Feb 2009 15:41:55 +0100
> Von: "Malte P?ggel" <malte at>
> An: lcdproc at
> Betreff: [Lcdproc] Changes to get EA-DOGM163 + four keys working with
> hd44780-lcd2usb driver

> Hi,
> i am currently developing a front panel LCD which is using a EA-DOGM163.
> This display has a Sitronix ST7036 Controller. Every next line in "3 line"
> mode starts 0x10 higher, if i enable the "extended mode" it would fix it a
> bit, but to 0x20... I have added a new parameter "LINEADDRESS" to change
> the
> default 0x20 value in extended mode:
> The new parameter in struct driver_private_data (hd44780-low.h):
> + int line_address; // line address in extended mode
> Reading the configuration on hd44780.c:
> [...]
> + p->line_address = drvthis->config_get_int(drvthis->name,
> "lineaddress", 0, 0);
> And in the HD44780_position function:
> + int lineaddress;
> if (p->ext_mode) {
> + // Linear addressing, each line normally starts 0x20 higher.
> + if(p->line_address) lineaddress = p->line_address; else
> lineaddress=0x20;
> + DDaddr = x + relY * lineaddress;
> } else {
> [...]

Voting for Joris' comment here.

> Another confusing thing is that the keys aren't converted to scancodes in
> the hd44780-lcd2usb.c.
> I found out that this is for those who have only the 2 keys of the
> original
> design, to have a virtual third key by pressing both buttons.
> In my case i added two keys to two additional ports - and now the value
> has
> to be converted to a scancode.
> Maybe it would be nice to add a parameter there, too - for those who would
> use the 2 ("3") keys and for those who use a custom layout / AVR firmware
> and more buttons.

I don't think this is really necessary. The value the lcd2usb driver returns
is directly used as a scancode: 1, 2 or 3 according to the keys pressed. The
hd44780.c maps this to DirectKeys.

The value (1-2-3) is directly read from the lcd2usb response message and
passed without modifications to hd44780.c

As you use a custom firmware you can take care of this yourself. You have to
decide what to happen if the user presses two or more keys at the same time.

If your firmware just returns a bitmap of the pressed keys (like the original
one) the driver would have to decide on how to handle simultaneous key
presses. But if your firmware returns a 'scancode' instead of a pressed key
bitmap - that is one numeric value for each key - the driver will work
without modification.

I don't like to add a modification to a driver to support a custom firmware
where this is not really necessary.

> Malte
> Ps: Could somebody fix the link of my homepage, mentioned in the LCDproc
> users guide (serialVFD Driver)? The old URL isn't working anymore - should
> be changed to

I can take care of this.


Archive powered by MHonArc 2.6.18.

Top of page