changing video resolution and orientation

This forum is for users of Atmel's SAM Series and who are interested in using WinCE OS.

Moderator: nferre

david80
Posts: 31
Joined: Tue Feb 06, 2007 5:18 pm

changing video resolution and orientation

Wed Apr 11, 2007 12:56 pm

Hi all,
I'm testing the binary version of the BSP for WinCE 6.0 (version 0.9.9) and I've seen that the display driver settings could be modified with the file:
C:\WINCE600\PLATFORM\AT91SAM9261EK_BIN\SRC\DRIVERS\AT91SAM9261Display\AT91SAM9261GraphicChip.reg

Code: Select all

[HKEY_LOCAL_MACHINE\System\GDI\ROTATION]
	"Angle"=dword:5A

; Video driver settings
[HKEY_LOCAL_MACHINE\Drivers\Display\LCDC]
;board does have 240x320 16 bpp color LCD
	"Width"=dword:F0
	"Height"=dword:140
	"Bpp"=dword:10
	"forceRGB"=dword:0
;	"Cached"=dword:1
	"VRAMWidthInPixel"=dword:F0
	"VRAMHeightInPixel"=dword:155
; When the frame buffer of the screen is  located in SRAM, PCK can't be shut down in idle mode
; cause it causes the screen to oscillate. If you locate the frame buffer in SDRAM 
; in the display file, you can enable PCK shut down in common\arm\atmel\at91sam926x\kernel\power\waitforinterrupt.s 
;	"VRAMaddress"=dword:23f00000 	; allocate the video memory in SDRAM
	"VRAMaddress"=dword:300000		; allocate the video memory in SRAM
	"UpperMargin"=dword:21
	"LowerMargin"=dword:13
	"LeftMargin"=dword:44
	"RightMargin"=dword:0A
	"Vsync"=dword:1
	"Hsync"=dword:1
	"PixelClock"=dword:5B8D80 ; 6000000 Hz


[HKEY_LOCAL_MACHINE\System\GDI\Drivers]
"Display"="at91sam9261ek_DDI.dll"

[HKEY_LOCAL_MACHINE\system\gdi\monitors]
	"TOTAL MONITORS"=dword:1
I need to change the video orientation (from portrait to landscape).
I think I've to change the rotation (In red I've made the modification to set it to 90, whereas the original value was zero).
Should I invert also any 320 and 240 reference? If yes, I need to inverse only "Height" and "Width" values or even other keys?

thanks in advance.
cheers
Adeneo
Contact:
Location: France - USA
Posts: 183
Joined: Fri May 14, 2004 9:58 am

Wed Apr 11, 2007 2:46 pm

If you want to change the video orientation, you just need to change the registry [HKEY_LOCAL_MACHINE\System\GDI\ROTATION] and let the width and height parmeters with the default value.

So, to have a landscape display you obtain a registry file like that:

[HKEY_LOCAL_MACHINE\System\GDI\ROTATION]
"Angle"=dword:5A

; Video driver settings
[HKEY_LOCAL_MACHINE\Drivers\Display\LCDC]
;board does have 240x320 16 bpp color LCD
"Width"=dword:F0
"Height"=dword:140
"Bpp"=dword:10
"forceRGB"=dword:0
; "Cached"=dword:1
"VRAMWidthInPixel"=dword:F0
"VRAMHeightInPixel"=dword:155
; When the frame buffer of the screen is located in SRAM, PCK can't be shut down in idle mode
; cause it causes the screen to oscillate. If you locate the frame buffer in SDRAM
; in the display file, you can enable PCK shut down in common\arm\atmel\at91sam926x\kernel\power\waitforinterrupt.s
"VRAMaddress"=dword:23f00000 ; allocate the video memory in SDRAM
; "VRAMaddress"=dword:300000 ; allocate the video memory in SRAM
"UpperMargin"=dword:21
"LowerMargin"=dword:13
"LeftMargin"=dword:44
"RightMargin"=dword:0A
"Vsync"=dword:1
"Hsync"=dword:1
"PixelClock"=dword:5B8D80 ; 6000000 Hz
david80
Posts: 31
Joined: Tue Feb 06, 2007 5:18 pm

Sun May 20, 2007 4:01 pm

I've tested the rotation with the 3.5'' LCD of the evaluation kit and it works perfectly.

Now we're making some test with an Hitachi display, 5.7''.
This LCD has got only DTMG and DCLK as control pins (HSynch is missing).
Moreover I've seen that interface timings of the 2 displays are different (although they are both Hitachi). For example the Horizontal Front/Back porch (HFP, HBP) are different.
I can imagine that, for making this lcd working, it requires some LCD driver code modification... or is something that could be changed in the configuration file?

BTW: which is the meaning of "UpperMargin" and "LowerMargin" in the configuration file?

thanks
Adeneo
Contact:
Location: France - USA
Posts: 183
Joined: Fri May 14, 2004 9:58 am

Mon May 21, 2007 10:33 am

david80,
The display driver is made as generic as possible.
UpperMargin, LowerMargin, LeftMargin and RightMargin values in registry are used to configure, the LCD_TIM1 and LCD_TIM2 LCDC register ( see datasheet).
The LCD_TIM1 and LCD_TIM2 configure the interface timings, for example porch, pulse and synchronisation!!

I hope it will help you.

BR

Adeneo
david80
Posts: 31
Joined: Tue Feb 06, 2007 5:18 pm

Mon May 21, 2007 12:00 pm

Adeneo wrote:david80,
UpperMargin, LowerMargin, LeftMargin and RightMargin values in registry are used to configure, the LCD_TIM1 and LCD_TIM2 LCDC register ( see datasheet).
The LCD_TIM1 and LCD_TIM2 configure the interface timings, for example
really interesting...many thanks for the support.
I've looket at the LCDC documentation: LCDTIM1 and LCDTIM2 are 32 bit registers; which is the right relationship between these 2 registers and the 4 parameters (UpperMargin, LowerMargin, LeftMargin and RightMargin)?

For the 3,5 Hitachi LCD (TX09D...) here's the parameters values:
UpperMargin=33
LowerMargin=19
LeftMargin=68
LowerMargin=10
Adeneo
Contact:
Location: France - USA
Posts: 183
Joined: Fri May 14, 2004 9:58 am

Mon May 21, 2007 2:26 pm

UpperMargin is the VBP field of LC_TIM1 register
LowerMargin is the VFP field of LC_TIM1 register
VSync is the the VPW field of LC_TIM1 register

LeftMargin is the HBP field of LC_TIM2 register
RightMargin is the HFP field of LC_TIM2 register
HSync is the the HPW field of LC_TIM2 register

You will have to compute the correct values for that registers, that match with your LCD screen.

Adeneo
david80
Posts: 31
Joined: Tue Feb 06, 2007 5:18 pm

Tue May 22, 2007 5:23 pm

I've gone throught the documentation of the LCD controller of the AT91SAM9261 and the documentation of the display LCD 3,5''.
I can't succeeded in mapping the values in the reg file with the values of the LCD datasheet.

For istance, for the Hitachi 3,5'' display:
HBP=22
HFP=11

Am I missing something?
mezonchik
Posts: 1
Joined: Wed Nov 12, 2008 3:31 pm

Re: changing video resolution and orientation

Wed Nov 12, 2008 3:36 pm

Hello,

I have evaluation board AT91SAM9263EK with BSP-AT91SAM9263EK CE6.0 Binary Evaluation v1.3.0B.
I would like to generate a signal "Vsync".
I have set key "Vsync"=dword:1 (see AT91SAM9263EK CE6.0 TDD v1.3.0 A.pdf), but the signal was not generated.
Whether it is necessary to make still that?

TIA

Return to “WinCE”

Who is online

Users browsing this forum: No registered users and 3 guests