8 color palettes – Renesas SH7781 User Manual

Page 972

Advertising
background image

19. Display Unit (DU)

Rev.1.00 Jan. 10, 2008 Page 942 of 1658
REJ09B0261-0100

19.4.8

Color Palettes

8 bits/pixel data employs color palettes. Four color palettes can be used; these are called color
palette 1, color palette 2, color palette 3, and color palette 4.

The color palette used in each plane can be set to any among color palette 1, color palette 2, color
palette 3, and color palette 4 using the PnCPSL bits in PnMR. Each of the color palettes consists
of two alternate buffers; one serves as a display buffer, and the other is for CPU access. After
setting each color palette, by setting the color palette switching enable bits (CP4CE, CP3CE,
CP2CE, CP1CE) in CPCR to 1, the color palette thus set becomes valid at the next VSYNC falling
edge (internal update timing), or upon display reset (when the DRES bit in DSYSR is changed
from 1 to 0).

Notes on Use of Color Palettes:

1. Because palettes consist of alternate buffers, complete overwriting is necessary upon a color

palette update. However, when the details of color palette updates are being managed, there is
no problem with overwriting only the relevant part.

2. Upon completion of color palette settings, the switching enable bit must always be set to 1.

3. When reading a color palette which has been written from the CPU, reading should be

performed before setting the switching enabled bit to 1. If read after setting the bit to 1, there is
the possibility that different palette contents may be read after palette switching occurs.

Procedure For Setting A Color Palette:

• Procedure for switching from the initial state

The initial state (after power-on reset) is the display reset state.

A. Set the registers of the display unit (DU).

B. Set either color palette 1, color palette 2, color palette 3, or color palette 4.

C. After setting the color palette, set the color palette switching enable bit to 1.

D. Cancel the display reset.

• Procedure for switching from display state

In the display state, the DRES bit and DEN bit in the DSYSR are 0 and 1 respectively.

A. Confirm that the color palette switching enable bit is 0.

B. Set either color palette 1, color palette 2, color palette 3, or color palette 4.

C. After setting the color palette, set the color palette switching enable bit to 1.

Advertising