emWin driver GUIDRV_S1D15G00

Supported hardware

Controllers

The driver supports the Epson S1D15G00 controller.

Bits per pixel

Supported color depth is 12bpp.

Interfaces

The driver supports the 8 bit indirect interface.

Driver selection

To use GUIDRV_S1D15G00 for the given display, the following command should be used:

GUI_DEVICE_CreateAndLink(GUIDRV_S1D15G00, GUICC_M444_12, 0, 0);

Display data RAM organization

The picture above shows the relation between the display memory and the SEG and COM lines of the LCD.

RAM requirements of the driver

This LCD driver can be used with and without a display data cache, containing a complete copy of the contents of the
LCD data RAM. The amount of memory used by the cache is:

LCD_XSIZE * LCD_YSIZE * 2 bytes

Using a cache is only recommended if a lot of drawing operations uses the XOR drawing mode. A cache would avoid
reading the display data in this case. Normally the use of a cache is not recommended.

Additional run-time configuration

The table below shows the available run-time configuration routines of this driver:

Routine Explanation
GUIDRV_S1D15G00_Config Passes a pointer to a CONFIG_S1D15G00 structure to the driver.
GUIDRV_S1D15G00_SetBus8 Tells the driver to use the 16 bit indirect interface and passes
pointer to a GUI_PORT_API structure to the driver..

GUIDRV_S1D15G00_Config()

Description

Passes a pointer to a CONFIG_S1D15G00 structure to the driver.

Prototype

void GUIDRV_S1D15G00_Config(GUI_DEVICE * pDevice, CONFIG_S1D15G00 * pConfig);
Parameter Description
pDevice Pointer to the driver device.
pConfig Pointer to a CONFIG_S1D15G00 structure described below.

Elements of CONFIG_SSD1926

Data type Element Description
int FirstSEG First segment address to be used in the data RAM of the display controller.
The value can be determined experimentally or taken from
the display documentation. The value is normally 0.
int FirstCOM First common address to be used in the data RAM of the display controller.
The value can be determined experimentally or taken from
the display documentation. The value is normally 0.
int UseCache Enables or disables use of a data cache. Should be set to 1 for
enabling and to 0 for disabling.

GUIDRV_S1D15G00_SetBus8()

Description

Tells the driver to use the 8 bit indirect interface and passes a pointer to a GUI_PORT_API structure to the driver
containing function pointers to the hardware routiens to be used.

Prototype

void GUIDRV_S1D15G00_SetBus8(GUI_DEVICE * pDevice, GUI_PORT_API * pHW_API);
Parameter Description
pDevice Pointer to the driver device.
pHW_API Pointer to a GUI_PORT_API structure explained below.

Elements of GUI_PORT_API

Data type Element Description
void (*)(U8 Data) pfWrite8_A0 Pointer to a function which writes one byte
to the controller with C/D line low.
void (*)(U8 Data) pfWrite8_A1 Pointer to a function which writes one byte
to the controller with C/D line high.
void (*)(U8 *pData, int NumItems) pfWriteM8_A1 Pointer to a function which writes multiple byte
to the controller with C/D line high.
U16 (*)(void) pfRead8_A1 Pointer to a function which reads one byte
from the controller with C/D line high.

Configuration Example

#define XSIZE 130
#define YSIZE 130

GUI_PORT_API _PortAPI;

void LCD_X_Config(void) {
GUI_DEVICE * pDevice;
CONFIG_S1D15G00 Config = {0};

//
// Set display driver and color conversion for 1st layer
//
pDevice = GUI_DEVICE_CreateAndLink(GUIDRV_S1D15G00, GUICC_M444_12, 0, 0);
//
// Display driver configuration, required for Lin-driver
//
LCD_SetSizeEx (0, XSIZE, YSIZE);
LCD_SetVSizeEx(0, XSIZE, YSIZE);
//
// Driver specific configuration
//
Config.FirstCOM = 2;
GUIDRV_S1D15G00_Config(pDevice, &Config);
//
// Setup hardware access routines
//
_PortAPI.pfWrite8_A0 = _Write_A0;
_PortAPI.pfWrite8_A1 = _Write_A1;
_PortAPI.pfWriteM8_A1 = _WriteM_A1;
GUIDRV_S1D15G00_SetBus8(pDevice, &_PortAPI);
}