HD66787
Preliminary
Rev.0.22, May.23.2003, page 112 of 159
Write-data Mask Function
The HD66787 expands the 16-bit data sent from the microcomputer into the 18-bit data. In the18-bit
interface mode, data are not expanded. The write data mask function of the HD66787 controls the write
operation of the 18-bit data from the microcomputer to GRAM by bit. The write data mask function write
data in the bits whose corresponding bits in the write data mask resister (WM17–0) are assigned with “0”
and does not write data in the bits whose corresponding bits in the write data mask register (WM17–0) are
assigned with “1”, and the corresponding data in GRAM are not overwritten but retained. This function is
useful when only one-pixel data are rewritten or a particular color in the display is selectively changed.
R05 R04 R03 R02 R01 R00 G05 G04 G03 G02 G02 G01 G00 B05 B04 B03 B02 B01 B00
1
1
1
1
1
1
0
0
0
0
0
0
1
1
1
1
0
0
*
*
*
*
*
*
G04 G03 G02 G02 G01 G00
*
*
*
*
B01 B00
DB17
WM17
WM0
17
0
the microcomputer
Write data mask
GRAM data
G05
0
Data from
Note : Data are expanded into 18 bits in the 8/16-bit system interface and the 16 RGB interface modes.
DB0
Write data mask function
Graphics Operation Processing Examples
1. Write mode 1: AM = 0, LG2–0 = 000
This mode is used when data are horizontally written in high speed mode. It is also used to initialize the
graphics RAM (GRAM) or to draw a line horizontally. The write-data mask function (WM17–0) is also
available in these operations. After writing, the address counter (AC) automatically increments by 1 (I/D =
1) or decrements by 1 (I/D = 0), and jumps to the counter at the opposing edge of the next one-raster-row
below after when the counter reaches either left or right edge of GRAM.
0 0 0
0 0
1
1
1 1
1 1
1
1
0
1
1
1
1
1 0 0
1 1
1
1
0 1
1 0
0
1
1
0
0
1
0
1 1 0
0 1
0
0
1 1
0 0
0
0
0
0
0
0
0
1 0 0
1 1
*
*
* *
* *
*
*
1
*
*
*
*
1 1 0
0 1
*
*
* *
* *
*
*
0
*
*
*
*
WM17
WM0
DB17
DB0
“0000”H
“0002”H
“0001” H
Write-data mask:
Write-data (1)
Write-data (2)
*Write-mask <G>, <B> planes.
Data are expanded into 18 bits in 8/16-bit system
interface, and 16-bit RGB interface modes.
Write data (1)
Write data (2)
GRAM
in the GRAM with “*"
are not overwritten.
Note : The bits
Operation example
1) I/D = "1", AM = "0", LG2-0 = "000"
2) WM17-0 = "00FFF"H
3) AC = "0000"H
Write Mode 1