beautypg.com

An269 – Cirrus Logic AN269 User Manual

Page 46

background image

46

AN269REV1

AN269

As mentioned in the EP93xx User’s Guide, each pixel from the frame buffer may go through the color LUT,
followed by the grayscale LUT, as shown in

Figure 22

(diagram shows pixel path when color and grayscale

LUTs are both enabled).

As can be seen from the diagram, the upper 3 bits of data from each color are fed to their respective Gray-
scale LUT, which will then generate a 1-bit output depending on those 3 bits and the current horizontal and
vertical position. With this in mind, here are some examples from the example Grayscale (Red) lookup up
table, and explanations of what patterns they will generate.

Since 3 bits of input to the Grayscale LUT determine the output, there are 8 possible shades available for
each color channel. When all of these 3 bits are 0, the output from the grayscale LUT will always be 0. When
all 3 bits are 1, the output will always be 1. This leaves 6 possible shades which are not all 1 or all 0. The
example tables given are for a 25%, 50%, and 75% output. Since this is only 3 of 6 possible shades, the
others may be used for other brightness values. For simplicity, these are repeated in the example table
(which means the example tables have 5 of 8 possible values).

For the pixel value of Red[7:5] = 000b, we will use the entries at locations base+0x00, base+0x20,
base+0x40, and base+0x60. Note that all of these entries are 0, which means that regardless of horizontal
position, vertical position, or frame number the output will be 0.

Similarly, for the pixel value of Red[7:5] = 111b, we will use the entries at locations base+0x1C, base+0x3C,
base+0x5C, and base+0x7C. All of the entries at these locations are 1, and therefore the output value from
the LUT will always be 1.

The remaining input shades of Red[7:5] = 001b to 110b will give various shades of gray. For the case of
Red[7:5] = 001b, the following output patterns will be generated:

Red

Grayscale

LUT

Color LUT

256x24

SRAM

To Color

Mux and

Pixel

Shifting

Logic

Pixel data

from pixel
MUX and

blink logic

Red[7:5]

Green

Grayscale

LUT

Blue

Grayscale

LUT

Green[7:5]

Blue[7:5]

3

3

3

Gray Scale Generator

1

1

1

Figure 22. Color and Grayscale LUT