Epson Research and Development
Page 69
Vancouver Design Center
Programming Notes and Examples
S1D13503
Issue Date: 01/01/30
X18A-G-002-06
str = Gray4;
}
else // 4 colors
{
val = ReadRegister(1);
val &= 0xf7; // Clear AUX[01] bit 3
WriteRegister(1, val);
val = ReadRegister(3);
val &= 0xfb; // Clear AUX[03] bit 2
val |= 0x02; // Set AUX[03] bit 1
WriteRegister(3, val);
//
// Update Lookup Table for 4 colors
//
for (x = 0; x < 16; ++x)
{
WriteRegister(0x0e, x);
WriteRegister(0x0f, ColorLUT4Red[x]);
WriteRegister(0x0f, ColorLUT4Green[x]);
WriteRegister(0x0f, ColorLUT4Blue[x]);
}
str = Color4;
}
//
// Update Line Byte/Word Count register for 4 colors/gray shades
//
// Since 4 colors/gray shades corresponds to 4 pixels per byte, there
// are ((x horizontal pixels)/4) bytes per scan line. This means that
// there are ((x horizontal pixels)/8) words per scan line.
//
// Since the Memory Interface is set to 16 bits, the Line Byte/Word Count
// refers to words.
//
val = (PanelX / 8) - 1;
BytesPerScanLine = (PanelX / 4);
WriteRegister(2, val & 0xff); // Line Byte Count Register
val2 = ReadRegister(3);
val2 &= 0xfe; // Clear bit 0
val2 |= (val >> 8) & 0x01;
WriteRegister(3, val2); // Mode Register 1
PanelGrayLevel = 4;
ShowVerticalBars(pVideo, 0);
//
electronic components distributor