
Page 38
Epson Research and Development
Vancouver Design Center
SED1352
Programming Notes and Examples
X16-BG-007-04
Issue Date: 98/10/08
5.4.4 Dual Panel LCD
The following is the procedure to show a split screen image on a 4 gray shade 640x480 dual panel LCD. For this example
the SDU1352B0x is used; the Memory Interface is set to 16 bits, and 128k of display memory is available. In addition, the
two images shown on the split screen are each 640x240.
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 11). For the
SDU1352B0x, this address is C000:0000h.
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.
Calculate the total number of bytes required for image 1.
6.
Determine the display memory location for image 2.
Place image 2 immediately after image 1 (see Figure 11). Assign the starting address for image 2 as follows:
7.
Program the Screen 2 Display Start Address Register to point to the beginning of image 2.
Image 2 is placed right after image 1, as shown below:
AUX[08h] = 00h
AUX[09h] = 4Bh
8.
Write both image 1 and image 2 to their respective locations in display memory.
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
=
=
=
=
bytes per scan line
(
)
number of scan lines for image 1
(
)
×
160
240
×
38400 bytes
9600h bytes
=
=
=
image 2 address
base display memory address
(
)
size of image 1
(
)
+
=
C000:0000h
0000:9600h
+
=
C000:9600h
=
Screen 2 Display Start Address
Screen 1 Display Start Address
size of image 1 in bytes
2 bytes per word
--------------------------------------------------------
+
=
0000h
9600h
2
---------------
+
4B00h
=
=