Ram palette

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ram palette

1,270 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by siriasis on Tue Jan 10 16:58:04 MST 2012
Hi Guys
I am a novice in LPC1788 and has just started reading about LCD controller. There is one thing that is not clear for me.
I don't understand the meaning of RAM palette. Could you please explain me in a few words what is a Ram palette and how
to configure it. Why it is made accessible via color palette registers

Thank you.

Labels (1)
0 Kudos
Reply
2 Replies

1,165 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by siriasis on Thu Jan 12 16:06:06 MST 2012
Thank you so much for your response. Now it is clear for me. It is basically a color index module.
0 Kudos
Reply

1,165 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Wed Jan 11 17:39:33 MST 2012
The RAM palette is just an array of memory in the LCD controller than translates a color index value to a color bit pattern on the LCD bus.
The RAM palette allows up to 256 entries to be defined at 16 bits/color per entry.

You can use the palette RAM to define your own color patterns for color index values used in your frame buffer.

For example, you might want to use the following indices for the palette RAM...
Index 0 = 0x0000 = BLACK
Index 1 = 0x001F = Blue
Index 2 = 0x07E0 = Green
Index 3 = 0xF100 = Red
Index 4 = 0xFFFF = White

So instead of using the direct color values (0x0000, 0xFFFF, etc.), you can use the index (0, 4) into the palette RAM lookup table to select the color for a element on the display. The drawback is that you can only get a maximum of 256 colors out of a selection of 65536 colors. The advantage is that your frame buffer only uses 8-bits per pixel instead of 16-bits per pixel, cutting your frame buffer memory and display refresh bandwidth in half.
0 Kudos
Reply