Page 66
Epson Research and Development
Vancouver Design Center
S1D13503
Programming Notes and Examples
X18A-G-002-06
Issue Date: 01/01/30
7.3 Advanced Functions
#define VIRTUAL_X (360L)
#define VIRTUAL_Y (360L)
//-------------------------------------------------------------------------
//
// FUNCTION: ShowRegisters()
//
// DESCRIPTION: Shows the contents of the S1D13503 registers.
//
// INPUTS: None.
// RETURN VALUE: None.
//
//-------------------------------------------------------------------------
void ShowRegisters(void)
{
static unsigned char x;
static unsigned char red, green, blue;
printf("S1D13503 Registers: ");
for (x = 0; x < 16; ++x)
printf("%02X ", ReadRegister(x));
printf("\nS1D13503 Lookup Table: ");
for (x = 0; x < 16; ++x)
{
WriteRegister(0x0e, x);
red = ReadRegister(0x0f);
green = ReadRegister(0x0f);
blue = ReadRegister(0x0f);
if (x % 7 == 0)
printf("\n");
printf("(%02X,%02X,%02X) ", red, green, blue);
}
ShowMenu();
}
//-------------------------------------------------------------------------
//
// FUNCTION: GrayShadeBars()
//
// DESCRIPTION: Displays a series of vertical bars, each with a
// different color/gray shade.
// For color displays, bars are shown for 4, 16, and 256 colors.
electronic components distributor