
ViiiPeRiPheRaLMoDuLes6(LCD):LCDContRoLLeR(LCDC)
s1C33L17teChniCaLManuaL
ePson
Viii-1-31
VIII
LCDC
sub-windowconfigurationexample
The following shows an example to configure main and sub-windows.
[Conditions]
LCD panel resolution:
320
× 240 pixels
bpp mode:
4 bpp (16 shades of gray/16 colors)
Memory used:
External SDRAM (area 19, 0x10000000–)
Virtual screen size:
320
× 240 pixels
Sub-window size:
160
× 120 pixels
Sub-window start position: X = 80 pixels, Y = 60 pixels
Mainwindow
ExternalSDRAM
160
80
120
60
180
240
0x10000000
0x100095FF
0x10009600
0x1000BB7F
320
240
(unit:pixel)
Sub-window
Mainwindow
displaydata
Sub-window
displaydata
FigureVIII.1.6.5.2Sub-WindowConfigurationExample
1. Main window start address
This example assumes that the display data for the main window is located at the beginning of the external
SDRAM (area 19).
Main Window Display Start Address Register (0x301A70) = 0x10000000
2. Main window line address offset
Convert the screen width (320 pixels) into the number of words in 4-bpp mode and set it to MWLADR[9:0]
(D[9:0]/0x301A74).
MWLADR[9:0] (D[9:0]/0x301A74) = 320 pixels
× 4 bpp ÷ 32 bits = 40 words
Main Window Line Address Offset Register (0x301A74) = 40 (= 0x28)
3. Sub-window start address
This example assumes that the sub-window data is located immediately following the main window data
area.
Main window data size = 320 pixels
× 240 pixels × 4 bpp ÷ 8 bits = 0x9600 bytes
Sub-window Display Start Address Register (0x301A80) = 0x10000000 + 0x9600 = 0x10009600
4. Sub-window start and end positions
The X coordinates should be converted into the number of words in 4-bpp mode to set them to the registers.
The Y coordinates can be set to the registers in the line numbers.
Sub-window start position
PIPXST[9:0] (D[9:0]/0x301A88) = 80 pixels
× 4 bpp ÷ 32 bits = 10 words (= 0x0A)
PIPYST[9:0] (D[25:16]/0x301A88) = 60 lines (= 0x3C)
Sub-window Start Position Register (0x301A88) = 0x003C000A
Sub-window end position
PIPXEND[9:0] (D[9:0]/0x301A8C) = (80 + 160) pixels
× 4 bpp ÷ 32 bits -1 = 29 words (= 0x1D)
PIPYEND[9:0] (D[25:16]/0x301A8C) = 60 + 120 lines -1 = 180 lines (= 0xB3)
Sub-window End Position Register (0x301A8C) = 0x00B3001D
After the settings above are completed, write 0x803C000A to the Sub-window Start Position Register
(0x301A88) to enable display of the sub-window.