Page 64
Epson Research and Development
Vancouver Design Center
S1D13503
Programming Notes and Examples
X18A-G-002-06
Issue Date: 01/01/30
//
// Set Address Pitch Adjustment to 0
//
WriteRegister(0x0d, 0); // Write to Address Pitch Adjustment Register
//--------------------------------------
//
// Update Lookup Table for 16 gray shades/ 256 colors
//
if (PanelD == PANEL_MONO)
{
for (x = 0; x < 16; ++x)
{
WriteRegister(0x0e, x);
WriteRegister(0x0f, MonoLUT16[x]);
}
}
else
{
for (x = 0; x < 16; ++x)
{
WriteRegister(0x0e, x); // Auto-increment mode selected
WriteRegister(0x0f, ColorLUT256Red[x]);
WriteRegister(0x0f, ColorLUT256Green[x]);
WriteRegister(0x0f, ColorLUT256Blue[x]);
}
}
//--------------------------------------
//
// Now that system is initialized, set DISPLAY ON and enable LCDE
//
val = ReadRegister(1);
val |= 0x90; // DISPLAY ON, LCDE enabled
WriteRegister(1, val);
}
//-------------------------------------------------------------------------
//
// GetID()
//
// This function returns the Chip ID.
//
//-------------------------------------------------------------------------
static unsigned char GetID(int PortAddr)
{
static unsigned char ChipID;
electronic components distributor