BL_CTRL and VCFL_ON on efusA9 under WEC2013

  • Hello,


    are the BL_CTRL and VCFL_ON signals of the efusA9 already implemented in WEC2013 F&S Kernel 1.40? Are the signals usable even if the display is connected to the LVDS connector?


    I would like to switch the display on and off and to dimm the backlight darker and brighter from our application.


    I already checked the Changelog and Roadmap but did not find anything about them. I already checked the device driver documents but I did not find information dedicated to the efusA9.

  • OK, i found out how to use BL_CTRL:


    The PWM value of BL_CTRL is the "contrast voltage". So I added these lines to my Display Config script for NDCUCFG:


    reg set value ContrastEnable dword 1
    reg set value ContrastValue dword 0
    reg set value ContrastFreq dword 20000


    The Frequency on my oscilloscope actually is 50 kHz.


    contrast set 0 -> 99,x % duty cycle (full brightness)
    contrast set 4095 -> 0 % duty cycle (completly dark)

    • Which values are allowed for the ContrastFreq?
    • How can I set the contrast from my application without spawning a NDCUCFG process?
  • By the way, if anyone needs it: Here are my settings for the NEC NL10276BC13 TFT Display (6,5", 1024x768, LVDS):


    reg open \drivers\display\lcd
    reg set value Mode dword 100
    reg set value OutputDevice dword 16384
    reg create key Mode100
    reg open \drivers\display\lcd\Mode100
    reg del value Prefix
    reg del value ExtDll
    reg del value PWMDevice
    reg del value PWMChannel
    reg del value Freq
    reg del value DutyCycle
    reg enum
    reg set value Name string "NEC NL10276BC13"
    reg set value Type dword 0x00004006
    reg set value Config dword 0x12300000
    reg set value Columns dword 1024
    reg set value PPL dword 1024
    reg set value BLW dword 159
    reg set value HSW dword 1
    reg set value ELW dword 160
    reg set value Rows dword 768
    reg set value LPP dword 768
    reg set value BFW dword 18
    reg set value VSW dword 1
    reg set value EFW dword 19
    reg set value Width dword 132
    reg set value Height dword 99
    reg set value Bpp dword 16
    reg set value ContrastEnable dword 1
    reg set value ContrastValue dword 0
    reg set value ContrastFreq dword 20000
    reg set value LCDClk dword 65
    reg set value EnableCursor dword 1
    reg set value Rotate dword 0
    reg set value Msignal dword 2
    reg set value HVSync dword 2
    reg set value PONLcdPow dword 0
    reg set value PONLcdEna dword 0
    reg set value PONLcdBufEna dword 0
    reg set value PONVeeOn dword 0
    reg set value PONCflPow dword 0
    display mode set 100
    reg save
    reg open \drivers\display\lcd
    reg enum
    reg open \drivers\display\lcd\Mode100
    reg enum

  • Hello,
    ndcucfg commands are accessable by a libraray. You will find this library under the "Tools" download section. This is the easiest way.


    Also other possibilities will found in this forum, e.g Steuerung von VEEK mit C#... .

    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.

  • Hello,


    I downloaded the SDK (ndcucfg_lib.h and ndcucfg_lib.lib). I get this error at link time:

    1>------ Build started: Project: mcu-fw-x, Configuration: Release FSiMX6 WEC2013 ------
    1>LINK : fatal error LNK1113: invalid machine type 0x1C2
    ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


    Seems as if the LIB is not intended to be used with FSiMX6 WEC2013.

  • Hello,


    sorry, you are right, the library is for W7 only. I load the WEC2013 version up, you can download it now.

    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,
    i'm trying to use this ndcucfg_lib.dll in c#.net
    i got the following code:


    [DllImport("ndcucfg_lib.dll")]
    static extern void NDCUCFG_CmdBacklightOn();
    [DllImport("ndcucfg_lib.dll")]
    static extern void NDCUCFG_CmdBacklightOff();
    [DllImport("ndcucfg_lib.dll")]
    static extern Boolean NDCUCFG_CmdContrastSet(UInt32 contrast);
    [DllImport("ndcucfg_lib.dll")]
    static extern Boolean NDCUCFG_GetErrorMessage(Boolean error,string message);


    NDCUCFG_CmdBacklight is working perfect !


    but NDCUCFG_CmdContrastSet does nothing....


    Boolean res = NDCUCFG_CmdContrastSet((UInt32) trackBar1.Value);
    string Message = " ";
    Boolean ErrStatus = false;
    Boolean res2 = NDCUCFG_GetErrorMessage(ErrStatus,Message);
    MessageBox.Show(Message);


    the message i get back is: "ERROR 0: Undefined error."


    although the 'contrast set' command in nducfg.exe is working !


    What am i missing here?


    kind regards

  • just found the solution in ndcucfg_lib.h:


    [StructLayout(LayoutKind.Sequential)]
    public struct ContrastCmdInputParm
    {
    internal int command;
    internal int parm;
    };


    [DllImport("ndcucfg_lib.dll")]
    static extern Boolean NDCUCFG_CmdContrastSet(int contrast, ref ContrastCmdInputParm ip);


    ContrastCmdInputParm ip = new ContrastCmdInputParm();
    ip.command = 1;
    ip.parm = 0;
    Boolean res = NDCUCFG_CmdContrastSet(trackBar1.Value,ref ip);
    string Message = " ";
    Boolean ErrStatus = false;
    Boolean res2 = NDCUCFG_GetErrorMessage(ErrStatus,Message);
    //MessageBox.Show(Message);


    now it works.