English
Language : 

S1D13305F00A100 Datasheet, PDF (103/266 Pages) Epson Company – Embedded 80K byte SRAM display buffer.
5: ADVANCED TECHNIQUES
Examples
For the following examples we base our calculations on a 4 bit-per-pixel image displayed on a 256w
× 64h panel. We have set up a virtual size of 320w × 240h. Width is greater than height so we are in
landscape display mode. Refer to Section 2, “Initialization” on page 2-2 and Section 5.1, “Virtual
Display” on page 2-15 for assistance with these settings.
These examples are shown using a C-like syntax.
Example 3
Panning (Right and Left)
To pan to the right increase the start address value by one. To pan to the left decrease the start
address value. Keep in mind that, with the exception of 8 bit-per-pixel portrait display mode, the
display will jump by more than one pixel as a result of changing the start address registers.
Panning to the right.
StartWord = GetStartAddress();
StartWord ++;
SetStartAddress(StartWord);
Panning to the left.
StartWord = GetStartAddress();
StartWord --;
if (StartWord < 0)
StartWord = 0;
SetStartAddress(StartWord);
The routine GetStartAddress() is one which will read the start address registers and return the start
address as a long value. It would be written similar to:
long GetStartAddress()
{
return ((REG[10] & 1) * 65536) + (REG[0D] * 256) + (REG[0C]);
}
The routine SetStartAddress() break up its long integer argument into three register values and store
the values.
void SetStartAddress(long SA)
{
REG[0C] = SA
& 0xFF;
REG[0D] = (SA >> 8) & 0xFF;
Reg[10] = (SA >> 16) & 0xFF;
}
2-18
EPSON
S1D13705F00A PROGRAMMING NOTES
AND EXAMPLES (X27A-G-002-01)