Page 86
Epson Research and Development
Vancouver Design Center
S1D13503
Programming Notes and Examples
X18A-G-002-06
Issue Date: 01/01/30
ShowMenu();
}
//-------------------------------------------------------------------------
//
// FUNCTION: PowerSaving()
//
// DESCRIPTION: Starts power saving mode 2.
//
// INPUTS: None.
// RETURN VALUE: None.
//
//-------------------------------------------------------------------------
void PowerSaving(void)
{
static unsigned int val;
printf("Starting Power Saving\n");
//
// The following are the steps to enter a power save mode.
//
//
// Step 1: Turn off display
//
val = ReadRegister(1);
val &= 0x7f;
WriteRegister(1, val);
//
// Step 2: Disable LCDE (turn off LCD power supply).
// For the S5U13503B00C, set LCDE bit to 0.
//
val = ReadRegister(1);
val &= 0xef;
WriteRegister(1, val);
//
// Step 2: Wait for LCD power supply to drop to zero volts
// For the S5U13503B00C, wait about a half second.
//
Delay(500);
//
// Step 3: Enter Power Save Mode
//
val = ReadRegister(3);
val &= 0x3f;
val |= 0x80;
WriteRegister(3, val); // Set power saving mode 2
electronic components distributor