backlight control
backlight control
Anyone know how to control the backlight via software ?
The power settings dont seem to kick in, so the backlight doesnt turn off after X minutes.
The power settings dont seem to kick in, so the backlight doesnt turn off after X minutes.
-
- Posts: 8
- Joined: Fri Jul 17, 2009 6:24 am
Re: backlight control
i have the same probleme....
-
- Posts: 9
- Joined: Wed Apr 22, 2009 1:23 am
- Location: USA
- Contact:
Re: backlight control
There is sample back light control in the Linux test routines. Also, the "No-OS" test routines are best since they don't use drivers and you can see what bits to twiddle.
Re: backlight control
I stumbled upon an answer...
"The LED backlight can be turned on or off or modulated with GPB1. The
backlight signal is called LCD_PWR PWM output (GPB1 be sent through Depositors configuration for
PWM"
- http://andahammer.com/assets/Uploads/Al ... ntials.pdf
Now I need to figure out how to control the GPIO from WinCE in a simple way.
"The LED backlight can be turned on or off or modulated with GPB1. The
backlight signal is called LCD_PWR PWM output (GPB1 be sent through Depositors configuration for
PWM"
- http://andahammer.com/assets/Uploads/Al ... ntials.pdf
Now I need to figure out how to control the GPIO from WinCE in a simple way.
Re: backlight control
Well for whatever reason controlling GPIOB1 doesnt do anything to the backlight.
Must be based on a different design - the document, or due to WinCE's backlight driver overidding what Im setting (even thought a read-back shows the new value)
Anyways...
I did finally figure it out. (Much reading of the S3C2440 datasheet and maney code tries later)
-----
Setup:
Disable pull up on the GPIOG4 pin
Set the GPIOG4 to LCD_PWREN mode
Set the PWREN bit of the LCDCON5 register.
Use:
To control the LCD and thus the backlight, Toggle the ENVID bit of LCDCON1
-----
Info..
Since the LCD is being driven via the S3C2440's LCD driver the backlight appears to be as well.
The PWREN bit is used by the processor to control the LCD_PWREN signal. ("LCD_PWREN output signal enable/disable.")
Reading back in the datasheet, you will find that the LCD_PWREN signal can be controlled by the ENVID bit (which controls the video output/logic); unfortunatly the display is not initialized with the registers set to make use of the LCD_PWREN signal.
So you need to set the GPIOG4 pin to the proper mode, then set the PWREN bit, then the lcd logic and backlight can be controlled via the ENVID bit.
Must be based on a different design - the document, or due to WinCE's backlight driver overidding what Im setting (even thought a read-back shows the new value)
Anyways...
I did finally figure it out. (Much reading of the S3C2440 datasheet and maney code tries later)
-----
Setup:
Disable pull up on the GPIOG4 pin
Set the GPIOG4 to LCD_PWREN mode
Set the PWREN bit of the LCDCON5 register.
Use:
To control the LCD and thus the backlight, Toggle the ENVID bit of LCDCON1
-----
Info..
Since the LCD is being driven via the S3C2440's LCD driver the backlight appears to be as well.
The PWREN bit is used by the processor to control the LCD_PWREN signal. ("LCD_PWREN output signal enable/disable.")
Reading back in the datasheet, you will find that the LCD_PWREN signal can be controlled by the ENVID bit (which controls the video output/logic); unfortunatly the display is not initialized with the registers set to make use of the LCD_PWREN signal.
So you need to set the GPIOG4 pin to the proper mode, then set the PWREN bit, then the lcd logic and backlight can be controlled via the ENVID bit.
backlight control
It agree, it is an excellent idea
-
- Posts: 15
- Joined: Thu Aug 27, 2009 12:45 pm
Re: backlight control
So is the "last" update of WinCE image fix this control mecanisms ? How could you do that under WinCE ? Should the backlight driver be modified?
Re: backlight control
The backlight/lcd driver could be modified to perform the 'setup' steps.
But thats not needed, you can do it in software.
By writing to the registers you can make it do that. How ?
YOu can use the CFIO.dll (PhysicalAddressPointer) I posted earlier in the WinCE Sample LED's to access the registers.
I will be releasing an updated S3C2440 class and accompaniying Mini2440 class (from the above sample noted) that includes the backlight stuff in the next few days. Just need to test a couple things.
But thats not needed, you can do it in software.
By writing to the registers you can make it do that. How ?
YOu can use the CFIO.dll (PhysicalAddressPointer) I posted earlier in the WinCE Sample LED's to access the registers.
I will be releasing an updated S3C2440 class and accompaniying Mini2440 class (from the above sample noted) that includes the backlight stuff in the next few days. Just need to test a couple things.
-
- Posts: 15
- Joined: Thu Aug 27, 2009 12:45 pm
Re: backlight control
I'm writing in C language.
To be able to access Physical register I need to write a piece of code that is in kernel, isn't it ? I can't access these in my WinCE application ?
What does it takes to modify the driver to work properly ?
Should I proceed this way :
- Adding 3 lines of C code,
- Compiling the driver with ADS
- Recompiling WinCE with Platform builder.
To be able to access Physical register I need to write a piece of code that is in kernel, isn't it ? I can't access these in my WinCE application ?
What does it takes to modify the driver to work properly ?
Should I proceed this way :
- Adding 3 lines of C code,
- Compiling the driver with ADS
- Recompiling WinCE with Platform builder.
Re: backlight control
Since C is not managed code, it should be very easy to access the registers directly.
Im not sure how, but you should be able too.
The registers are memory mapped, possibly simply making a pointer to the memory and writing/reading to it may do the trick (thats what the C# physicaladdresspointer class does but within managed code)
There is no real need to modify the backlight driver, as you can do the initialization within user code.
Im not sure how, but you should be able too.
The registers are memory mapped, possibly simply making a pointer to the memory and writing/reading to it may do the trick (thats what the C# physicaladdresspointer class does but within managed code)
There is no real need to modify the backlight driver, as you can do the initialization within user code.
Who is online
Users browsing this forum: No registered users and 3 guests