![](http://datasheet.mmic.net.cn/370000/TVP3026-135_datasheet_16743199/TVP3026-135_49.png)
2–35
The port-select and color-key functions are integrated like a logical OR function. When either of the functions
switches to palette graphics (true-color or overlay through the palette RAM), palette graphics are displayed
instead of direct color. Therefore, when programming the device for any direct color mode, both the
color-key-control and miscellaneous-control registers must be set so that direct color graphics is displayed.
For true color, gamma corrected through the palette, one of the functions must be set to palette graphics.
2.8.1
Port-Select Switching
The port-select switching function is governed by the following equation:
SWITCH = (PSEL
×
MSC4)
⊕
MSC5
where:
MSCn is the nth bit of the miscellaneous control register.
(11)
Table 2-23 then applies:
Table 2–23. Port-Select Switching
MULTIPLEX MODE SELECTED
DISPLAY RESULT
SWITCH = 0
Direct-color
Direct-color
NOTES
SWITCH = 1
Overlay
True-color
Direct-color with overlay
Direct-color with true-color
The DAC output is undefined if SWITCH = 1 when doing overlay switching in a
direct-color mode that does not have overlay capability.
Miscellaneous-control register bits MSC5 and MSC4 enable or disable the port
select function and select the polarity, as shown in the equation above. When
port-select switching is disabled (MSC4 = 0), MSC5 sets the port-select function
to either palette graphics (MSC5 = 0, default) or direct-color graphics (MSC5 = 1).
The device supports port-select switching when using multiplexing modes.
However, caution must be observed when using the port-select function with the
multiplexing modes other than 1:1, since the PSEL signal is latched on LCLK (same
as the pixel port). Port-select switching on a pixel basis with multiplexing modes
other than 1:1 can be accomplished using the color-key switching function by
supplying multiple PSEL signals, one per pixel, into the available overlay terminals.
2.8.2
Color-Key Switching
The TVP3026 supports color-key-switching modes in which color data from the direct-color and overlay
ports is compared to a set of user-definable color-key registers. Based on the outcome of the comparison,
either direct color, true-color, or overlay, is displayed. High and low color-key registers are provided for each
color and overlay so that ranges of colors can be compared as opposed to a single color value. The color-key
function is controlled by the color-key-control register bits CKC0–CKC4 according to the following equation:
COLOR–KEY = [(OL + CKC0)
×
(R + CKC1)
×
(G + CKC2)
×
(B + CKC3)]
⊕
CKC4
(12)
where: OL = 1
if
if
if
if
color-key OL low
color-key red low
color-key green low
color-key blue low
≤
overlay (Note 17)
≤
direct color (RED)
≤
direct color (GREEN)
≤
direct color (BLUE)
≤
color-key OL high
≤
color-key red high
≤
color-key green high
≤
color-key blue high
R = 1
G = 1
B = 1
then
if
if
COLOR–KEY = 1, overlay or true-color is displayed.
COLOR–KEY = 0, direct-color is displayed.