
Page 40
Epson Research and Development
Vancouver Design Center
SED1352
Programming Notes and Examples
X16-BG-007-04
Issue Date: 98/10/08
5.4.4.1 Displaying a Single Image on a Dual Panel
The following is the procedure to show a single image on a dual panel LCD. In this procedure the single image is broken
into two smaller images; image 1 is placed on the top panel and image 2 is placed on the bottom panel. For this example
the SDU1352B0x is used with a 4 gray shade 640x480 dual panel LCD; the Memory Interface is set to 16 bits, and 128k
of display memory is available.
1.
Determine whether the Display Start Address Registers refer to bytes or words.
Since the Memory Interface is set to 16 bits, the Display Start Address Registers refer to words. Note that when ad-
dresses refer to words, the image must be aligned in memory such that the beginning is found on a word boundary
(the least significant bit of the memory address must be 0).
2.
Calculate the number of bytes per scan line.
3.
Determine the display memory location for image 1.
For simplicity, assign the beginning of display memory as the starting address of image 1 (see Figure 14). For the
SDU1352B0x, this address is C000:0000h.
Figure 14: Memory Map for a Dual Panel showing a Single Image
4.
Program the Screen 1 Display Start Address Register to point to the beginning of image 1.
Since image 1 is at the beginning of display memory for a 128k system, program the Screen 1 Display Start Address
Register to 0000h.
AUX[06h] = 00h
AUX[07h] = 00h
5.
Determine the size of image 1.
Display Memory
Screen 1 Display Start Address
First half of Image
Screen 2 Display Start Address
Second half of Image
4 gray shades => 2 bits per pixel
2 bits per pixel => 4 pixels per byte
number of bytes per scan line
pixels per scan line
pixels per byte
----------------------------------------------
640
4
---------
160 bytes per scan line
00A0h bytes per scan line
=
=
=
=
vertical size of image 1
vertical size of panel 1
number of scan lines in display
2
--------------------------------------------------------------------------
=
480
2
---------
240 scan lines
=
=
=
size
display width in pixels
pixels per byte
------------------------------------------------------
number of scan lines in image 1
(
)
×
640
4
---------
240
×
38400 bytes
9600h bytes
=
=
=
=