English
Language : 

SED1374 Datasheet, PDF (125/420 Pages) Epson Company – SED1374 Embedded Memory Color LCD Controller
Epson Research and Development
Vancouver Design Center
Page 29
Panning to the right.
StartWord = GetStartAddress();
StartWord ++;
SetStartAddress(StartWord);
Panning to the left.
StartWord = GetStartAddress();
StartWord --;
if (StartWord < 0)
StartWord = 0;
SetStartAddress(StartWord);
Example 4: Scrolling (Up and Down)
To scroll down, increase the value in the Screen 1 Display Start Address Register by the
number of words in one virtual scan line. To scroll up, decrease the value in the Screen 1
Display Start Address Register by the number of words in one virtual scan line.
Step 1: Determine the number of words in one virtual scanline.
bytes_per_line = pixels_per_line / pixels_per_byte = 320 / 2 = 160
words_per_line = bytes_per_line / 2 = 160 /2 = 80
Step 2: Scroll up or down
To scroll up.
StartWord = GetStartAddress();
StartWord -= words_per_line;
if (StartWord < 0)
StartWord = 0;
SetStartAddress(StartWord);
To scroll down.
StartWord = GetStartAddress();
StartWord += words_per_line;
SetStartAddress(StartWord);
long GetStartAddress (void)
{
return (REG[0D] * 256 +REG[0C];
}
void SetStartAddress (long StartWord)
{
REG[0C] = StartWord & 0xFF;
REG[0D] = StartWord / 256;
}
Programming Notes and Examples
Issue Date: 99/04/27
SED1374
X26A-G-002-02