Lookup Palette
11-14
The pixel data is stored in the frame buffer the same way in all three cases (as
shown in Figure 11–5); only the little endian accesses of the MPU result in the
different pixel positions of each access.
The top and bottom addresses of the frame buffer (palette e pixels
data) are programmed in the DMA controller. A synchronization interrupt
occurs if the LCD display information settings such as pixels-per-line, lines per
frame, color/monochrome mode, and bits-per-pixel that are programmed by
the user are not in accordance with the size of the frame buffer as programmed
in the DMA.
The following equations are used to calculate the total frame buffer size (in
bytes) to be programmed in the system DMA, based on varying pixel size
encoding and screen sizes.
For 2 bits
ń
pixel : FrameBufferSize
+
32
)
(Lines * Columns)
4
For 4 bits
ń
pixel : FrameBufferSize
+
32
)
(Lines * Columns)
2
For 8 bits
ń
pixel : FrameBufferSize
+
512
)
(Lines * Columns)
For 12
ń
16 bits
ń
pixel : FrameBufferSize
+
32
)
2(Lines * Columns)
11.4 Lookup Palette
The encoded pixel data from the input FIFO is used as an address to index and
select individual palette locations: 2-bit pixels address four locations, 4-bit
pixels address sixteen locations, and 8-bit pixels select any of the 256 palette
entries.
When a palette entry is selected by the encoded pixel value, the contents of
the entry are sent to the color/grayscale space/time base dither circuit. In color
mode, the value within the palette is made up of three 4-bit fields, one for each
color component: red, green, and blue. In monochrome mode, only one 4-bit
value is present. For both modes, the 4-bit values represent 1 of 15 intensity
levels. For color operation, an individual frame is limited to a selection of 256
colors (the number of palette entries). The LCD controller, however, can
generate a total of 3375 colors (15 levels per color x 3 colors). When 12 or
16 bit-per-pixel mode is enabled, the palette is bypassed. For passive
displays, 12-bit pixels and 16-bit pixels are sent directly to the dither logic.