backlight control

armboarder
Posts: 15
Joined: Thu Aug 27, 2009 12:45 pm

Re: backlight control

Post by armboarder » Thu Oct 15, 2009 11:33 pm

My knowledge :
Assuming you are in user mode (application). Each pointer (which is a VitrualAdress) is intercepted by MMU, and then translated to physical adress.
I don't know how WinCE works, so :
- If my application manipulates a physical pointer does the MMU try to translate it ?
- Does it give access violation error ?

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: backlight control

Post by nicolas » Thu Oct 15, 2009 11:50 pm

I have not done any C work in relation to the registers, only managed code.

What I did find was looking thru the wince drivers, specifically LEDDriver.cpp
It has some code that initializes the memory address (s2440IOP) and also deals with the registers.

Im sure this can be extrapolated to user mode.

The method calls are also reinforced via the post here http://social.msdn.microsoft.com/forums ... 29055180b2 (different platform but same desired goal)

armboarder
Posts: 15
Joined: Thu Aug 27, 2009 12:45 pm

Re: backlight control

Post by armboarder » Fri Oct 16, 2009 4:06 am

Thank you for the link.
Now I've figured how to access physical registries under user mode. If I understand correctly, we must first reserve virtual memory by using VirtualAlloc then use VirtualCopy (which is unavailable under Win32 ) to map virtual memory to the physical memory.
So now, I just need to do the initialization which described once in my application then call the backlight driver to set different PWM value ?
I didn't look at the interface of the driver yet.
How is going with CFIO.dll, did you succeed to set different brightness value ?

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: backlight control

Post by nicolas » Fri Oct 16, 2009 8:11 am

Once you can write to the registers the rest is a breeze.
While the mini2440 has several pwm pins, I have been unable to find the configuration needed to actually control brightness.
The pin responsible is Port G.4

At the moment I have only been able to turn on/off the backlight.

I have the sample almost ready and will be posting it in the next day or so.

spinbot
Posts: 8
Joined: Sat Jul 25, 2009 5:07 am

Re: backlight control

Post by spinbot » Wed Oct 28, 2009 10:57 pm

Hey nicolas,

Thanks for you great work. Any chance of releasing the code that controls the back light?

Cheers

nicolas
Posts: 162
Joined: Sun Jun 07, 2009 4:32 pm

Re: backlight control

Post by nicolas » Fri Oct 30, 2009 2:12 am

Ill post up the VB.Net sample soon. Just been so busy and I had to reinstall windows yesterday.

With the information on the first page and the other sample i released, the LED one, you should be able to put them together and accomplish the task.

Sorry its taking so long for the full sample.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests