µC/GUI LCDColorOnMono Driver

This driver supports systems with passive color displays connected to an LCD controller in monochrome mode. The LCD controller is assumed to have a linear video memory organization and to work in a 16 gray-scale mode, yielding 16 levels of intensity for every sub-pixel and therefore 16*16*16 = 4096 colors on the display. If the LCD controller supports colors, it is usually better to use it in color mode (with the LCDLin diver), as this is more efficient. An example of where this driver is used in the LCD controller built-into the Cirrus Logic EP7312.

Supported controllers

  • None.

Bits per pixel

The supported color depth is 12 bpp.

Interfaces

The driver supports a 16 bit full bus interface from the CPU to the LCD controller.

Display data RAM organization


This driver supports a 12 bpp memory area for color displays. The pictures above show the dependence between the memory area handled by the driver and the SEG and COM lines of the LCD.

Additional RAM requirements of the driver

None.

Additional driver functions

None.

Hardware configuration

This driver accesses the hardware with a simple bus interface as described in the "Low-Level Configuration" chapter of the user manual. The following table lists the macros which must be defined for hardware access:

Macro Description
LCD_INIT_CONTROLLER Initialization sequence for the LCD controller.
LCD_READ_MEM Read the contents of video memory of controller.
LCD_WRITE_MEM Write to video memory (display data RAM) of controller.

Example:

A QVGA color display needs the following defines in LCDConf.h:
#define LCD_XSIZE 320
#define LCD_YSIZE 240

The LCD controller needs to be initialized to control a monochrome display of 960x240 resolution.

Additional configuration switches

The following table shows optional configuration switches available for this driver:

Macro Description
LCD_ON Function replacement macro which switches the LCD on.
LCD_OFF Function replacement macro which switches the LCD off.

Special requirements for certain LCD controllers

The driver needs to work in the fixed palette mode 444 (default if working in 12bpp mode). The driver does not work with other palettes.