Epson Research and Development Page 27
Vancouver Design Center
Programming Notes and Examples S1D13705
Issue Date: 02/01/22 X27A-G-002-03
Example 2: From the above, what is the maximum number of lines our image can
contain?
Step 1: Calculate the number of bytes on each line.
bytes_per_line = pixels_per_line / pixels_per_byte = 640 / 4 = 160
Each line of the display requires 160 bytes.
Step 2: Calculate the number of lines the S1D13705 is capable of.
total_lines = memory / bytes_per_line = 81920 / 160 = 512
We can display a maximum of 512 lines. Our example image requires 480 lines so this
example can be done.
5.2 Panning and Scrolling
Panning and scrolling describe the operation of moving a physical display viewport about
a virtual image in order to view the entire image a portion at time. For example, after setting
up the previous example (virtual display) and drawing an image into it we would only be
able to view one quarter of the image. Panning and scrolling are used to reveal the rest of
the image.
Panning describes the horizontal (side to side) motion of the viewport. When panning to the
right the image in the viewport appears to slide to the left. When panning to the left the
image to appears to slide to the right. Scrolling describes the vertical (up and down) motion
of the viewport. Scrolling down causes the image to appear to slide up and scrolling up
causes the image to appear to slide down.
Both panning and scrolling are performed by modifying the start address register. The start
address registers in the S1D13705 are a word offset to the data to be displayed in the top
left corner of a frame. Changing the start address by one means a change on the display of
the number of pixels in one word. The number of pixels in word varies according to the
color depth. At 1 bit-per-pixel a word contains sixteen pixels. At 2 bit-per-pixel there are
eight pixels, at 4 bit-per-pixel there are four pixels and at 8 bit-per-pixel there is two pixels
in each word. The number of pixels in each word represent the finest step we can pan to the
left or right.
When portrait mode (see Hardware Rotation on page 37) is enabled the start address
registers become offsets to bytes. In this mode the step rate for the start address registers if
halved making for smoother panning.