LCD Controller Operation
11-11
LCD Controller
The first palette entry (palette entry 0) also contains an extra field that is used
to configure the LCD controller synchronously at the beginning of each frame.
Bits 12, 13, and 14 of the first palette entry contain a field that is used to select
the number of bits-per-pixel that is to be used in the following frame and the
number of entries that are used in the palette RAM. The bits-per-pixel (BPP)
bit-field is decoded by the LCD to correctly unpack pixel data into 1-bit, 2-bit,
nibbles, bytes, 12-bit values, or words, and it is decoded by the palette to tell
it how many address bits are contained in the pixel data it is supplied, configur-
ing the palette size to 16 or 256 entries. The 12- and 16-bit pixel modes bypass
the LCD palette and supply 12-bit values directly to the dither logic when pas-
sive mode is enabled or else supply 16-bit values directly to the output FIFOs
when active mode is enabled. Table 11–2 shows the encoding of the BPP bit
field.
Table 11–2.
Bits Per Pixel Encoding for Palette Entry 0 Buffer
Bit
Name
Value
Description
14–12
BPP
Bits-per-pixel
001
2 bits-per-pixel
010
4 bits-per-pixel
011
8 bits-per-pixel
1xx
12 bits-per-pixel and 16 bits-per-pixel
Note:
Four 2-bit pixels and two 4-bit pixels are packed into each byte, and 12-bit pixels are right-justified on half-word bound-
aries (in the same format as palette entry).
Following the palette buffer is the pixel data buffer that contains one encoded
pixel value for each of the pixels present on the display. The number of pixel
data values depends on the size of the screen (that is, 1024 x 768 = 786,432
encoded pixel values). Again, each pixel data value can be 2, 4, 8, 12, or
16 bits wide. Figure 11–5 through Figure 11–9 show the memory organization
within the frame buffer for each size pixel encoding. For 4-bit encoding, four
pixels are placed into each half-word; for 12-bit encoding, the value is right-
justified within a half-word.