Epson Research and Development
Page 33
Vancouver Design Center
When panning to the left on an LCD set for a color depth of 4 bpp, the registers would be
updated as follows.
1. Pan left by 1 pixel
- decrement the pixel panning register by 1: REG[048h] = 11b.
- decrement the start address register by 1: (REG[042h],
REG[043h], REG[044h]) - 1.
2. Pan left by 1 pixel
3. Pan left by 1 pixel
4. Pan left by 1 pixel
Note
- decrement the pixel panning register by 1: REG[048h] = 10b.
- decrement the pixel panning register by 1: REG[048h] = 01b.
- decrement the pixel panning register by 1: REG[048h] = 00b.
The above example assumes the pixel panning register is initially set at 0.
5.2.2 Examples
The following examples assume the display system has been configured to view a 800x600
pixel image in a 640x480 viewport. Refer to Section 2, “Initialization” on page 12 and
Section 5.1, “Virtual Display” on page 26 for assistance with these settings.
Example 3:Panning - Right and Left
To pan to the right, increment the value in the pixel panning register (REG[048h] for LCD,
REG[068h] for CRT/TV). When the pixel pan value reaches the maximum value for the
current color depth (i.e. 11b for 4 bpp, 1b for 8 bpp) then set the pixel pan value to zero and
increment the start address value. To pan to the left (assuming the pixel panning register is
zero), decrement the value in the pixel panning register and decrement the start address
register. When the pixel pan value reaches zero then decrement both the pixel panning
register and start address register again. If the pixel panning register contains a value other
than zero, decrement the value in the pixel panning register only and when the pixel pan
value reaches zero, decrement both the pixel panning register and start address register.
Note
Panning operations are easier to follow if a variable (e.g. PanValue) is used to track both
the pixel panning and start address registers. The least significant bits of PanValue will
represent the pixel panning register value and the more significant bits are the start ad-
dress register value.
The following example pans to the right by one pixel when the color depth is 4 bpp.
1. Increment PanValue.
PanValue
= PanValue + 1
2. Mask off the values from PanValue for the pixel panning and start address register
portions. In this case, 4 bpp, the lower two bits are the pixel panning value and the
upper bits are the start address.
PixelPan
= PanValue AND 3
Programming Notes and Examples
Issue Date: 01/02/06
S1D13506
X25B-G-003-03