Backlight Brightness Control WEC7

Hello,

on our baseboard PWM4 is used for backlight brightness control.

I tried to change brightness with test routine shown below.

Unfortunately I did not see any influence - brightness did not change at all.

Do you have any idea what may be wrong ?

Thank you !

void set_backlightpwm()  { 
   DWORD dutyPercent = 0; 
   HANDLE pwm = Pwm_Init(L"PWM4");  
   if (pwm) {
     int returnValue = Pwm_SetConfigInt(pwm, L"BaseFreq",20000000,StoreVolatile);
     uIo io = APALIS_PIN(8);
     returnValue = Pwm_SetConfigInt(pwm, L"io", io.GenericDefinition, StoreVolatile);
     returnValue = Pwm_Open(pwm);
     Pwm_SetPwm(pwm, 1000/*Hz*/, 32768/*of 65536*/);                   // 1kHz, 50%
     for (dutyPercent = 0; dutyPercent <= 100; dutyPercent++) {
       Pwm_SetPwm(pwm, 1000/*Hz*/, (65536 * dutyPercent)/100);       // 1kHz, sweep duty cycle
       Sleep(100);
     }
     Pwm_Close(pwm);
     Pwm_Deinit(pwm);   
   }
}

Dear @Frax222
The code looks correct at first sight.

  1. Did you measure the pin to see whether the PWM signal changes? If you don’t have a scope around, you can take a regular volt meter and measure the signal’s DC voltage.
  2. If the PWM changes, then measure the same signal on the display itself (or as close to the display as you can)
  3. Finally check whether your display supports this kind of brightness control on the pin which you connected to PWM4

Regards, Andy

Thank you for your answer.
After checking my display I think you are right with 3.

Thanks for the feedback. Is the issue solved?

Best regards,
Jaski