Initialization Code - Epson SED1352 Technical Manual

Graphics lcd controller
Table of Contents

Advertisement

Page 48

6.2 Initialization Code

//-------------------------------------------------------------------------
//
// FUNCTION: Initialize()
//
// DESCRIPTION: Intialize SED1352 registers.
//
// INPUTS: This function looks at the followingl global variables to
//
determine the appropriate register settings:
//
PanelX, PanelY, PanelType
//
// OUTPUTS: The following global variables are changed:
//
PanelGrayLevel, BytesPerScanLine
//
//-------------------------------------------------------------------------
void Initialize(void)
{
static unsigned int val;
static unsigned int x;
PanelGrayLevel = 16;
//--------------------------------------
//
// Mode Register:
//
Display = ON
//
Panel = SINGLE
//
Mask XSCL = NOT MASKED
//
LCDE = NOT ENABLED
//
Gray Scale = 16 Gray Shades (4 bits/pixel)
//
LCD Data Width = 8 bit data transfer
//
Memory Interface = 16 bits
//
RAMS = Addressing for 8Kx8 SRAM
//
val = 0x8C;
if (PanelType == TYPE_DUAL)
{
val |= 0x40;
val &= ~0x04;
}
WriteRegister(1, val);
//--------------------------------------
//
// Line Byte/Word Count Register
//
SED1352
X16-BG-007-04
// Set panel type to DUAL
// Set LCD Data Width to 4 bit data transfer
// Write to Mode Register
Epson Research and Development
Vancouver Design Center
Programming Notes and Examples
Issue Date: 98/10/08

Advertisement

Table of Contents
loading

Table of Contents