LCDproc development and user support list

Text archives Help


[Lcdproc] HD44780 40x4 with Backlight and winamp wiring


Chronological Thread 
  • From: bsdfan at nurfuerspam.de (Markus Dolze)
  • Subject: [Lcdproc] HD44780 40x4 with Backlight and winamp wiring
  • Date: Sat, 24 Jan 2009 15:14:13 +0100

Sascha wrote:
> Thanks for the fast replies. I've tried to switch the Backlight menu Option
> on
> and off. If the Backlight in Menu is on, I am getting the same behavior as
> in
> the cvs version. So I think setting Pin 17 to High/Low. This is why The LCD
> thinks there is no 2nd controller anymore. Is The Backlight Menu Option on
> by
> default in CVS? And how could I change / reset the settings in the menu?
>
> I tried changing the Menu Backlight option by using the joy driver. But I
> wasn't able to disable / enable this option I think.
>
> Sascha Zielinski
>
>
Today I hook up my 40x4 to the parallel port and discovered the same
behaviour as you. The first thing you should verify is that you have the
settings:
Size=40x4
vspan=2,2

set in your LCDd.conf.


I also had a look at how the backlight setting is handled within the
hd44780 driver:

1)

The hd44780 driver checks a) if the "Backlight" setting is ON and b) if
the connection type sub-driver (winamp) has a backlight function.

As the winamp connection type has a BL function (whether or not a the
hardware has a switchable backlight) the latter is always true.

If the "Backlight" setting is "off", the BL function is called with
"state=0", which in turn results in the PIN on the parallel port to be
set high (as the BC327 is PNP transisitor).

The backlight PIN is changed at two locations: First within the BL
function and second with each senddata() call.

Interestingly the display is correctly initialized (all lines turn blank
on startup) because the BL fuctions is first called with the first
screen rendering call. Before that the backlight PIN should be low and
the display's backlight should light up.

So anybody with a backlight and a "one controller display" with
"Backlight=off" in LCDd.conf should see the display light up upon LCDd
startup and then going it out with the switch to the server screen.

The above is true for all hd44780 connection-types. Depending on the
default state of the backlight you will see the backlight turning off
with the server screen IF "Backlight=Off" in LCDd.conf. I have seen this
with the lcd2usb i.e. But as this device stores the brightness setting
accross power / reset-cycle it is off upon the next startup.

2)

The driver's backlight function is called upon each screen rendering,
even if the backlight state has not changed. For parallel port devices
this has no negative effect. But for devices like the lcd2usb this means
that the backlight setting is updated with each screen, resulting in an
EEPROM write every time.

This applies to other displays as well (MtxOrb, CFontz). I think this
could be optimized as well.


Solution for 1)
Try with the attached patch. It makes the hd44780 BL function return
immediately instead of calling the connection BL function with (state=0)
if no switchable backlight is attached.


Solution for 2)
Outstanding.


Regards
Markus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-server__drivers__hd44780.diff
URL:
<http://lists.omnipotent.net/pipermail/lcdproc/attachments/20090124/ef559d62/attachment-0001.txt>




Archive powered by MHonArc 2.6.18.

Top of page