µC/GUI LCD667XX Driver
You are here : Micrium
: Products : µC/GUI :
LCD6642X Driver
Supported controllers
This driver has been tested with the following LCD controllers:
- Hitachi HD66766
- Hitachi HD66772
It should be assumed that it will also work with any controller
of similar organization.
Bits per pixel
The supported color depth is 16 bpp.
Interfaces
The driver supports 8-bit parallel (simple bus) and 3 pin SPI interface.
Display data RAM organization

The picture above shows the relation between the display memory and the SEG and COM lines of the LCD.
Additional 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 x LCD_YSIZE x 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. The driver can be used with a write buffer used for drawing multiple pixels of the same color. If multiple pixels of the same color should be drawn the driver first fills the buffer and then executes only one time the macro LCD_WRITEM_A1 to transfer the data to the display controller. The default buffer size is 500 bytes.
Additional driver functions
None.
Hardware configuration
This driver accesses the hardware with a simple bus interface or with a 3 pin SPI interface. 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_NUM_DUMMY_READS |
Number of required dummy reads if a read operation should be executed. The default value is 2. If using a serial interface the display controllers HD66766 and HD66772 need 5 dummy reads. |
| LCD_SERIAL_ID |
If using the serial interface this macro defines the ID signal of the device ID code. It should be 0 (default) or 1. |
| LCD_USE_SERIAL_3PIN |
Should be set to 1 if the serial interface is used. Default is 0. |
| LCD_WRITE_BUFFER_SIZE |
Using a write buffer increases the performance of the driver. If multiple pixels should be written with the same color the driver first fills the buffer and then writes the contents of the buffer with one execution of the macro LCD_WRITEM_A1 instead of multiple executions. The default buffer size is 500 bytes. |
| LCD_READM_A1 |
Read multiple bytes from display controller with RS-line high. |
| LCD_WRITEM_A0 |
Write multiple bytes to display controller with RS-line low. |
| LCD_WRITEM_A1 |
Write multiple bytes to display controller with RS-line high. |
The driver initializes the ’Driver Output Mode’ and ’Entry Mode’ register itself. The user does not need to initialize this registers in the LCD_INIT_CONTROLLER macro.
Additional configuration switches
None.
Special requirements for certain LCD controllers
The driver needs to work in the fixed palette mode -1. The driver does not work with other configurations. You should use the following macro definition in the file LCD-Conf. h:
#define LCD_FIXEDPALETTE -1
|