Page 28
Epson Research and Development
Vancouver Design Center
Offset
= PixelsPerVirtualLine ÷ PixelsPerWord
This value may not necessarily represent the number of words shown on the CRT/TV
display. This is the virtual width of the display image and may be greater than or equal to
the physical display width. If PixelsPerVirtualLine equals the physical display width as set
in the CRT/TV Horizontal Display Width register (REG[050h]), then the virtual display
and physical display are the same size.
5.1.2 Examples
Example 1:Determine the offset value required for a line of 800 pixels at a color
depth of 8 bpp.
At a color depth of 8 bpp each byte contains one pixel, therefore each word contains two
pixels.
PixelsPerWord
= 16 ÷ bpp
= 16 ÷ 8
= 2
To calculate the offset value for this example, the following formula is used.
Offset
= PixelsPerVirtualLine ÷ PixelsPerWord
= 800 ÷ 2
= 400
= 190h words
For the LCD, REG[047h] is set to 01h and REG[046h] is set to 90h.
For the CRT/TV, REG[067h] is set to 01h and REG[066h] is set to 90h.
Example 2:Program the Memory Address Offset Registers to support a 16 color (4
bpp) 800x600 virtual display on a 640x480 LCD panel.
To create a virtual display the offset registers must be programmed to the horizontal size of
the larger “virtual” image. After determining the amount of memory used by each line (see
example 1), calculate whether there is enough memory to support the desired number of
lines.
1. Initialize the S1D13506 registers for a 640x480 panel. (See Section 2, “Initialization”
on page 12).
2. Calculate the number of pixels per word.
PixelsPerWord
= 16 ÷ bpp
= 16 ÷ 4
= 4
3. Determine the offset register value.
S1D13506
X25B-G-003-03
Programming Notes and Examples
Issue Date: 01/02/06