lpc1788 LCD configuration

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

lpc1788 LCD configuration

587 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Steve on Thu Dec 22 05:41:45 MST 2011
Hello.

I have a problem with LCD controller configuration on LPC 1788. I want use tft mode 1:5:5:5, but in user manual i found only this information:
   3:1 LcdBpp LCD bits per pixel:
      Selects the number of bits per LCD pixel:
        000 = 1 bpp.
        001 = 2 bpp.
        010 = 4 bpp.
        011 = 8 bpp.
        100 = 16 bpp.
        101 = 24 bpp (TFT panel only).
        110 = 16 bpp, 5:6:5 mode.
        111 = 12 bpp, 4:4:4 mode.

I am also using LPC 2478 and it is have a special register to select the LCD function and the LCD mode - PINSEL11 (page 192, UM10237). Maybe LPC1788 have something like that register?

Regards,
Steve.
Labels (1)
0 Kudos
5 Replies

496 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Steve on Mon Dec 26 01:21:09 MST 2011
Thank you very much, it is work.
0 Kudos

496 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Fri Dec 23 12:33:47 MST 2011
Mode 0x04 is 5:5:5 mode with an intensity bit in the most significant bit.
Mode 0x06 is 5:6:5 mode.

Hope this helps
0 Kudos

496 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Steve on Fri Dec 23 02:01:16 MST 2011
My problem is how  set 16 bpp, 1:5:5:5 mode. 
0 Kudos

496 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Steve on Fri Dec 23 01:59:56 MST 2011
I know about this file, but my problem is how  set 16 bpp, 1:5:5:5 mode. In UM10470 said only about 16bpp, 5:6:5 mode.
0 Kudos

496 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Thu Dec 22 10:25:39 MST 2011
Check out the CMSIS file: LPC177x_8x.h

In there, you'll find many register definitions that make it easier to navigate the LPC1788 registers.

Within this file, there is are definitions like these:
<code>
#define LPC_AHB_BASE          (0x20080000UL)
  *
  *
  *
#define LPC_LCD_BASE          (LPC_AHB_BASE  + 0x08000)
  *
  *
  *
typedef struct
{
  __IO uint32_t TIMH;                   /* LCD Registers                      */
  __IO uint32_t TIMV;
  __IO uint32_t POL;
  __IO uint32_t LE;
  __IO uint32_t UPBASE;
  __IO uint32_t LPBASE;
  __IO uint32_t CTRL;
  __IO uint32_t INTMSK;
  __I  uint32_t INTRAW;
  __I  uint32_t INTSTAT;
  __O  uint32_t INTCLR;
  __I  uint32_t UPCURR;
  __I  uint32_t LPCURR;
       uint32_t RESERVED0[115];
  __IO uint32_t PAL[128];
       uint32_t RESERVED1[256];
  __IO uint32_t CRSR_IMG[256];
  __IO uint32_t CRSR_CTRL;
  __IO uint32_t CRSR_CFG;
  __IO uint32_t CRSR_PAL0;
  __IO uint32_t CRSR_PAL1;
  __IO uint32_t CRSR_XY;
  __IO uint32_t CRSR_CLIP;
       uint32_t RESERVED2[2];
  __IO uint32_t CRSR_INTMSK;
  __O  uint32_t CRSR_INTCLR;
  __I  uint32_t CRSR_INTRAW;
  __I  uint32_t CRSR_INTSTAT;
} LPC_LCD_TypeDef;
  *
  *
  *
#define LPC_LCD               ((LPC_LCD_TypeDef       *) LPC_LCD_BASE      )
</code>

This makes it very simple to access the LCD control register

like this:
<code>
    LPC_LCD->CTRL |= (4<<1);  // bits 3-1 are 100 = 0x04 = 16bpp

</code>

0 Kudos