26 LCD CONTROLLER (LCDC)
26-30
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Image area in VRAM
(Virtual screen)
Screen address offset
Display area
Display
start
address
LCD panel
6.2.1 Virtual Screen Feature
Figure 26.
The screen address offset is the number of words corresponding to the image width (virtual screen width). The
LCDC manipulates display data in units of words. Therefore, the image width (number of pixels) must be a
multiple of (32 bits
÷
bpp).
The screen address offset is calculated as follows:
Main screen address offset = Virtual screen width in pixels
×
bpp / 32 [words]
Set this value to MW_OFS[11:0]/LCDC_MAINOFS register.
Example: LCD panel size = 320
×
240 pixels, 8-bpp mode, image (virtual screen) size = 640
×
480 pixels
Display line width = 320
×
8 / 32 = 80 (=0x50) [words]
(= 320 [bytes])
MW_OFS[11:0] = 640
×
8 / 32 = 160 (=0xa0) [words]
(= 640 [bytes])
If the image data start address is 0x10000000 and the image area ([X1, Y1]–[X2, Y2] = [160, 120]–[479,
359]) is displayed in the main window, the main window start address is 0x10012ca0.
(X1
×
8 / 32)
[word]
+ MW_OFS[11:0]
[word]
×
Y1 = 0x4b28 [words] = 0x12ca0 [bytes]
Main window start address = 0x10 0x12ca0 = 0x10012ca0
The LCDC determines the addresses of the first and end pixels in each line as follows:
First pixel address in
N
th line = Display start a (
N
-1)
×
MW_OFS[11:0]
[word]
End pixel address in
N
th line = Display start a (
N
-1)
×
MW_OFS[11:0]
[word]
+ Display line width
[word]
-1
1st line start address
= 0x10012ca0
1st line end address
= 0x10 (0x50 -1)
×
4 = 0x10012dc4
2nd line start address = 0x10 1
×
0xa0
×
4 = 0x10012f20
2nd line end address
= 0x10 (0x50 -1)
×
4 = 0x10013044
:
240th line start address = 0x10 239
×
0xa0
×
4 = 0x10038220
240th line end address = 0x10 (0x50 -1)
×
4 = 0x10038344
8-bpp virtual screen in VRAM
Screen address offset
160 words
640 pixels
480 line
80 words
40 words
240 line
320 pixels
Display area
Display area
(160, 120)
(0, 0)
(479, 359)
VRAM start address
0x10000000
Display start address
0x10012ca0
1st line
0x10012ca0–
2nd line
0x10012f20–
3rd line
0x100131a0–
240th line 0x10038220–
:
6.2.2 Example of Virtual Screen Configuration
Figure 26.