
6
Configuring the élanSC300 Device’s Internal CGA Controller for a Specific LCD Panel
HOW THE élanSC300 MICROCONTROLLER DISPLAYS COLORS AS GRAY SHADES
The élanSC300 microcontroller uses gray shading to
represent colors on a monochrome LCD panel. It does
this by associating a duty cycle with a particular IRGB
color value (see Table 3). A duty cycle of x ÷ y indicates
that for every y times the LCD display is refreshed, the
pixel will be displayed x times.
Video Index 19H, bit 4 enables color mapping for CGA
mode. This allows the mapping of one IRGB/gray scale
value to another IRGB/gray scale value that looks bet-
ter for a particular LCD. In this way, applications that
use colors that do not look good on a particular display
can still be used without having to change the applica-
tion.
SINGLE-SCREEN LCD SUPPORT
A number of factors, including physical properties and
mode of operation, determine whether or not the
élanSC300 microcontroller is capable of driving a spe-
cific display.
Physical Properties
I
4-bit data interface
The display to be driven must have 4 data lines to
connect to the élanSC300 microcontroller’s
LCDD3–LCDD0
I
Panel resolution
The resolution, combined with the mode of opera-
tion described in the next section, determines the
rate at which the élanSC300 microcontroller will re-
fresh the display, as well as the amount of video
SRAM used (the élanSC300 microcontroller sup-
ports a maximum of 32 Kbyte of video SRAM). The
video SRAM becomes a limiting factor for support-
ing the display only when a Graphics mode is used.
I
Refresh rate
The rate at which the élanSC300 microcontroller re-
freshes the display is affected by the mode of oper-
ation as well as the panel resolution. If a panel’s
refresh rate is not specifically stated, a maximum
value can be approximated by taking:
4 ÷ ((shift clock period) · (display resolution))
The “4” comes from the number of pixel data bits
per shift clock. On the élanSC300 microcontroller,
this number
must
be 4. For example, a 320 x 240
display that has a minimum shift clock period of
125 ns, will have a maximum refresh rate of
4 ÷ (125 ns · 320 · 240) = 416 Hz. A typical refresh
value is around 75 Hz. A value less than 60 Hz will
probably yield unacceptable results (e.g., the
screen will appear very dim or will blink).
Table 3.
Color Codes Mapped to Pixel Duty Cycles
Color
IRGB/Gray Scale
Duty Cycle
Common Denominator
Black
Blue
Green
Cyan
Red
Magenta
Brown
Light Gray
Dark Gray
Light Blue
Light Green
Light Cyan
Light Red
Light Magenta
Yellow
White
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0
0/24
3/24
12/24
16/24
8/24
9/24
18/24
21/24
4/24
6/24
20/24
18/24
12/24
16/24
21/24
24/24
1/8
1/2
2/3
1/3
3/8
3/4
7/8
1/6
1/4
5/6
3/4
1/2
2/3
7/8
1