![](http://datasheet.mmic.net.cn/120000/MC68328PV_datasheet_3559354/MC68328PV_94.png)
LCD Controller
MOTOROLA
MC68328 USER’S MANUAL 12/9/97
8-13
LCD
CONTROLLER
8
PRELIMINARY
8.2.7 Grayscale Generation
The LCD controller is configured to only drive non-split monochrome LCD panels. It cannot
handle color STN or TFT panels. However, grayscale generation can be selected by setting
the GS bit in the LCD panel interface configuration (LPICF) register. In grayscale mode, the
number of data words for displaying the gray levels increases as opposed to black and white
mode. Also, the line buffer must be filled before the next line is displayed. Therefore, the
LCD pixel clocking, LCD frame refresh rate, line buffer fill, and line to line interval are
affected by the selection of grayscale mode. The frame refresh rate and pixel clocking are
determined by the LCD pixel clock divider (LPXCD) register. Frame refresh is also a function
of the LCD screen size in pixels. Therefore, the LXMAX and LYMAX registers are factors for
calculating frame refresh. Figure 8-6 illustrates grayscale mapping and its memory
requirement.
8.2.8 Gray Palette Mapping
Using a proprietary frame-rate control (FRC) algorithm, the LCD controller can generate a
maximum of four out of seven simultaneous gray levels by mapping the 2-bit data into four
3-bit gray codes. Then four out of seven bit densities are selected from the gray palette
table.
Figure 8-6 illustrates how the 2-bit pixel data is mapped into 3-bit gray codes. The GMN bits
are defined in the software-programmable LCD gray palette mapping registers (LGPMRs).
Each of the four 3-bit codes obtained from the first table select a density level (0, 1/4,
5/
16,
1/
2,
11/
16,
3/
4 and 1) from the gray palette table, as shown in Table 8-2. Crystal formulations and
driving voltages vary,which means the visual gray effect may or may not be linearly related
to the frame rate. For certain graphics, a logarithmic scale, such as 0, 1/4,
1/
2, and 1, might
be more effective than a linearly spaced scale like 0, 5/16,
11/
16, and 1. A flexible mapping
scheme lets you optimize a visual effect for your particular panel or application.
Table 8-2. Grayscale Code Mapping
CODE MAPPING
DATA
GRAY CODE
00
G02G01G00
01
G12G11G10
10
G22G21G20
11
G32G31G30