Epson Research and Development
Page 67
Vancouver Design Center
Programming Notes and Examples
S1D13503
Issue Date: 01/01/30
X18A-G-002-06
// For monochrome displays, bars are shown for black and white,
// 4, and 16 gray shades.
//
// INPUTS: None.
//
// RETURN VALUE: None.
//
//-------------------------------------------------------------------------
void GrayShadeBars(void)
{
static unsigned int val, val2, x;
static unsigned char _far *pVideo;
static char Gray4[] = "Vertical Bars at 4 Gray Shades";
static char Color4[] = "Vertical Bars at 4 Colors";
static char Gray16[] = "Vertical Bars at 16 Gray Shades";
static char Color16[] = "Vertical Bars at 16 Colors";
static char *str;
printf("Displaying Vertical Bars\n");
Initialize();
SetDisplay(OFF);
ClearLCDScreen();
//
// Access memory banks
//
FP_SEG(pVideo) = 0xd000;
FP_OFF(pVideo) = 0x0000;
//--------------------------------------
if (PanelD == PANEL_MONO)
{
//
// Select black and white mode
//
val = ReadRegister(3);
val |= 0x04; // Set AUX[03] bit 2
val &= 0xfd; // Clear AUX[03] bit 1
WriteRegister(3, val);
//
// Update Line Byte/Word Count register for black and white.
//
// Since black and white has 8 pixels per byte, there
electronic components distributor