Switch on/off display controller

  • Sometimes it is usefull to switch on/off the display controller from your application. For example, if you want extend the lifetime of the backlight or reduce power consumption.
    NetDCU5.2 and NetDCU8 implement this functionality with power managment functions.

    Files

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hi,


    for those who use VB.net:



    best regards Benjamin

  • Mit der Firmware 1.40 schaltet das Display nicht mehr das Backlight aus, sondern das ganze Display wird weiß erleuchtet!


    Hat jemand eine Idee wie sich das wieder beheben lässt?


    Gruß Christian

  • Hallo,
    ich nehme an Sie sprechen von derNetDCU8!
    Ab Version 1.40 können dort die Hintergrundbeleuchtung und das LCD getrennt abgeschaltet werden und zwar über die Registry unter "HKLM\System\CurrentControlSet\Control\Power\Timeouts" mit den Werten "ACScrennOff" und "ACBacklightOff" (0=off, sonst Timeouts in Sekunden). Diese Feature darf aber das bisherige Verhalten nicht beeinflussen! Habe das mit den Kommandos von "ndcucfg" gestested. Deshalb vermute ich das bei Ihnen der "Schalter" für die Hintergrundbeluchtung zerstört ist. Reagiert bei Ihnen Die Hintergrundbeleuchtung auf das Kommando "backlight off"?

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Ja es geht um die NetDCU8.


    Hier der verwendete Code (Übersetzung des VB-Beispiels in C#):



    "backlight on" bzw. "backlight off" über netcfg funktionieren weiterhin!


    Das Programm nd52_video_power.zip (siehe oben) schaltet auch nur auf einen weißen Bildschirm. Backlight bleibt an!


    Gruß Christian

  • Hallo,
    was passiert wenn Sie zuerst in den "PowerStandBy" Modus wecheln und dann erst "PowerOff" aufrufen?
    Wenn "PowerOff" beides übernimmt, hat man den Nachteil, das man die Spannungen (Vlcd, Vcfl) nicht beliebig getrennt schalten kann.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Danke, damit funktioniert es !


    Hier der berichtigte Code:

  • Hello,


    We encouter a problem with the last posted c# code with picocom2.
    We success to switch display controller OFF,
    but never succeed to switch it ON again.


    We tried to call VideoPowerStandBy + VideoPowerOff (then backlight is off),
    but VideoPowerOn doesn't work.


    We tried to call only VideoPowerStandBy (it seems to do the same as above)
    but VideoPowerOn doesn't work.


    We tried also to use BACKLIGHTCOMMAND instead of SETPOWERMANAGEMENT,
    but it doesn't work with BACKLIGHT_CMD_ON or BACKLIGHT_CMD_OFF.


    With DCUTerm, the command display power on and off doesn't work.


    Another command we tried is CONTRASTCOMMAND.
    It works fine.
    We thought we could use it to have an ersatz of VideoPowerOff,
    by setting the contrast to the min. But the new problem is:
    - it could be ok with the picocom2 testboard with Hitachi TX09 LCD screen
    as the screen get black
    - with our own screen URT 8277, the minimum contrast is not low enough
    to get a black screen.


    Waiting for any suggestion.

  • Hello,
    you may use OS function "SetSystemPowerState" for your purpose. Please refer MSDN.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thank you for the answer.
    With Picocom2 startkit, we tried :
    SetSystemPowerState(null, POWER_STATE_ON, POWER_FORCE);
    and
    SetSystemPowerState(null, POWER_STATE_OFF, POWER_FORCE);
    instead of calling SETPOWERMANAGEMENT
    but we did'nt get any reaction.
    What could be wrong ?

  • Hi,


    Without success with the former method,
    we try another one which is acceptable for us:


    we would like to realize these DCUTerm commands
    (where mode100 is for our URT8227 screen):


    reg open \drivers\display\LCD\mode100
    reg set value contrastenable dword 0 (or 1)
    reg save
    reboot


    This works fine, but we would like to be able to do the same,
    in c#, without reboot. Is it possible ?


    Regards,

  • Hello,


    -> SetSystemPowerState
    i suggest parameter 1 must be "screen off" (http://msdn.microsoft.com/en-us/library/aa929708.aspx)!


    -> It is also possible to call ndcucfg via command line (ndcucfg -c "backlight on" OR ndcucfg -c "backlight off") from your app, c++ sample:
    ...
    BOOL bRes = CreateProcess(_T("ndcucfg"), _T("-c \"backlight off\""), NULL , NULL, 0, 0, NULL, NULL, NULL, NULL);
    ...

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hi,


    We also tried
    SetSystemPowerState(null, POWER_STATE_IDLE, POWER_FORCE);//Screen Off, Touch Disable
    and
    SetSystemPowerState("ScreenOff", 0, POWER_FORCE);
    which seems to do the same: the screen gets off and immediately on
    (we are not touching screen or moving mouse during this time).
    How can we maintain off ?


    As we did not succeed to use SetSystemPowerState, we tried the last kernel.
    We were using Picocom2 V1.09 kernel.
    We loaded Picocom2 V1.13 kernel and we got what we needed:


    in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\Timeouts
    we set ACScreenOff to the wanted value and it works !


    As we missed this debug in kernel history.txt,
    could you explain us what stands for this debug in history.txt
    (is it - 0000245: [Display Driver] Display controller power enabled too late. in V11 ?)


    Best regards,