Notation on LPC2478 LCD Display Buffer Design

Post Reply
esky-sh
Posts: 1449
Joined: Sat Dec 20, 2008 4:21 am

Notation on LPC2478 LCD Display Buffer Design

Post by esky-sh » Tue Dec 30, 2008 12:56 am

According NXP User Manual, this buffer can be located in internal SRAM or external SDRAM or SRAM. Apparently the reading and writing of this buffer should be continuous according pixels setting in LCD controller registers. But there is still dummy bytes needed to fill the gap if row pixels setting in LCD controller registers less than 320.

Here is a sample code for this kind of dummy region reservation:

void PutPixel(INT32S x,INT32S y,INT16S c)
{
if(x < 240 && y < 320)
*(volatile INT16U *)(SDRAM_BASE + 2*(x + 320 * y)) = c;
}


When the function PutPixel calculate the location of memory for the specific dot on a 240x320 LCD screen, value 320 is used for minimal lenght of row even current row pixel value is 240.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests