emWin driver GUIDRV_SSD1926

Supported hardware

Controllers

The driver works with the Solomon SSD1926 display controller.

Bits per pixel

Currently supported color depth is 8. The display controller supports up to 32 bits per pixel. The driver can be extended
on demand if support for an other color depth is required.

Interfaces

The driver supports the 16 bit indirect interface.

Color depth and display orientation

This driver can be used with different orientations. The following table shows the configuration macros which can be
used to create and link the driver during the initialization:

Identifier Color depth and orientation
GUIDRV_SSD1926_8 8bpp, default orientation
GUIDRV_SSD1926_OY_8 8bpp, Y axis morrored
GUIDRV_SSD1926_OX_8 8bpp, X axis morrored
GUIDRV_SSD1926_OXY_8 8bpp, X and Y axis morrored
GUIDRV_SSD1926_OS_8 8bpp, X and Y swapped
GUIDRV_SSD1926_OSY_8 8bpp, X and Y swapped, Y axis morrored
GUIDRV_SSD1926_OXY_8 8bpp, X and Y swapped, X axis morrored
GUIDRV_SSD1926_OSXY_8 8bpp, X and Y swapped, X and Y axis morrored

Driver selection

To use GUIDRV_SSD1926 for the given display, e.g. the following command can be used:

GUI_DEVICE_CreateAndLink(GUIDRV_SSD1926, GUICC_323, 0, 0);

Please refer to the emWin documentation to get more information about using the proper palette mode.

Display data RAM organization

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

Additional RAM-requirement

This display driver may be used with or without a display data cache, containing a complete copy of the LCD data RAM.
If no cache is used, there are no additional RAM requirements. It is recommended to use this driver with a data
cache for faster LCD-access. The amount of memory used by the cache may be calculated as follows:

Size of RAM (in bytes) = LCD_XSIZE * LCD_YSIZE

Additional run-time configuration

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

Routine Explanation
GUIDRV_SSD1926_Config Passes a pointer to a CONFIG_SSD1926 structure to the driver.
GUIDRV_SSD1926_SetBus16 Tells the driver to use the 16 bit indirect interface and passes
pointer to a GUI_PORT_API structure to the driver..

GUIDRV_SSD1926_Config()

Description

Passes a pointer to a CONFIG_SSD1926 structure to the driver.

Prototype

void GUIDRV_SSD1926_Config(GUI_DEVICE * pDevice, CONFIG_SSD1926 * pConfig);
Parameter Description
pDevice Pointer to the driver device.
pConfig Pointer to a CONFIG_SSD1926 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_SSD1926_SetBus16()

Description

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

Prototype

void GUIDRV_SSD1926_SetBus16(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 (*) (U16 Data)

pfWrite16_A0 Pointer to a function which writes one word
to the controller with C/D line low.

void (*) (U16 Data)

pfWrite16_A1 Pointer to a function which writes one word
to the controller with C/D line high.

void (*) (U16 *pData, int NumItems)

pfWriteM16_A0 Pointer to a function which writes multiple word
to the controller with C/D line low.

void (*) (U16 *pData, int NumItems)

pfWriteM16_A1 Pointer to a function which writes multiple word
to the controller with C/D line high.

U16 (*) (void)

pfRead16_A1 Pointer to a function which reads one word
from the controller with C/D line high.

Configuration Example

#define XSIZE 320L
#define YSIZE 240L

GUI_PORT_API _PortAPI;

void LCD_X_Config(void) {
  GUI_DEVICE     * pDevice_0;
  CONFIG_SSD1926   Config_0   = {0};
  //
  // Set display driver and color conversion
  //
  pDevice_0 = GUI_DEVICE_CreateAndLink(GUIDRV_SSD1926_8, GUICC_8666, 0, 0);
  //
  // Common display driver configuration
  //
  LCD_SetSizeEx (0, XSIZE, YSIZE);
  LCD_SetVSizeEx(0, XSIZE, YSIZE);
  //
  // Set driver specific configuration items
  //
  Config_0.UseCache = 1;
  //
  // Set hardware access routines
  //
  _PortAPI.pfWrite16_A0  = LCD_X_8080_16_Write00_16;
  _PortAPI.pfWrite16_A1  = LCD_X_8080_16_Write01_16;
  _PortAPI.pfWriteM16_A0 = LCD_X_8080_16_WriteM00_16;
  _PortAPI.pfWriteM16_A1 = LCD_X_8080_16_WriteM01_16;
  _PortAPI.pfRead16_A1   = LCD_X_8080_16_Read01_16;
  GUIDRV_SSD1926_SetBus16(pDevice, &_PortAPI);
  //
  // Pass configuration structure to driver
  //
  GUIDRV_SSD1926_Config(pDevice, &Config_0);
}