EmbeddedRelated.com
Forums

LPC2478-STK LCD setup pins

Started by Daniel P May 24, 2009
Hi All,

I was looking through the code for initializing the LCD
All the PINSEL were set to the LCD function where needed
and All the PINMODE were set to"neither pull-up nor pull-down"

except for PINMODE0 bit 18:19 is set to pullup, that is pin P0[9]

is that intentional?

thanks
void GLCD_Init (const Int32U *pPain, const Int32U * pPallete)
{
pInt32U pDst = (pInt32U) LCD_VRAM_BASE_ADDR;
// Assign pin
PINSEL0 &= BIN32(11111111,11110000,00000000,11111111);
PINSEL0 |= BIN32(00000000,00000101,01010101,00000000);
PINMODE0&= BIN32(11111111,11111100,00000000,11111111);
PINMODE0|= BIN32(00000000,00000010,10101010,00000000);
PINSEL3 &= BIN32(11110000,00000000,00000000,11111111);
PINSEL3 |= BIN32(00000101,01010101,01010101,00000000);
PINMODE3&= BIN32(11110000,00000000,00000000,11111111);
PINMODE3|= BIN32(00001010,10101010,10101010,00000000);
PINSEL4 &= BIN32(11110000,00110000,00000000,00000000);
PINSEL4 |= BIN32(00000101,01001111,11111111,11111111);
PINMODE4&= BIN32(11110000,00110000,00000000,00000000);
PINMODE4|= BIN32(00001010,10001010,10101010,10101010);
PINSEL9 &= BIN32(11110000,11111111,11111111,11111111);
PINSEL9 |= BIN32(00001010,00000000,00000000,00000000);
PINMODE9&= BIN32(11110000,11111111,11111111,11111111);
PINMODE9|= BIN32(00001010,00000000,00000000,00000000);
PINSEL11&= BIN32(11111111,11111111,11111111,11110000);
PINSEL11|= BIN32(00000000,00000000,00000000,00001111);
// Init GLCD cotroller



An Engineer's Guide to the LPC2100 Series

Hi,

I don't think that's intentional, in fact I did not do that in my code.
Did you get your LCD displaying a picture? I'm still struggling with the EMC and my RAM. You may email me so we can exchange our code samples...

Best regards,
Nico
--- In l..., Daniel P wrote:
>
> Hi All,
>
> I was looking through the code for initializing the LCD
> All the PINSEL were set to the LCD function where needed
> and All the PINMODE were set to"neither pull-up nor pull-down"
>
> except for PINMODE0 bit 18:19 is set to pullup, that is pin P0[9]
>
> is that intentional?
>
> thanks
> void GLCD_Init (const Int32U *pPain, const Int32U * pPallete)
> {
> pInt32U pDst = (pInt32U) LCD_VRAM_BASE_ADDR;
> // Assign pin
> PINSEL0 &= BIN32(11111111,11110000,00000000,11111111);
> PINSEL0 |= BIN32(00000000,00000101,01010101,00000000);
> PINMODE0&= BIN32(11111111,11111100,00000000,11111111);
> PINMODE0|= BIN32(00000000,00000010,10101010,00000000);
> PINSEL3 &= BIN32(11110000,00000000,00000000,11111111);
> PINSEL3 |= BIN32(00000101,01010101,01010101,00000000);
> PINMODE3&= BIN32(11110000,00000000,00000000,11111111);
> PINMODE3|= BIN32(00001010,10101010,10101010,00000000);
> PINSEL4 &= BIN32(11110000,00110000,00000000,00000000);
> PINSEL4 |= BIN32(00000101,01001111,11111111,11111111);
> PINMODE4&= BIN32(11110000,00110000,00000000,00000000);
> PINMODE4|= BIN32(00001010,10001010,10101010,10101010);
> PINSEL9 &= BIN32(11110000,11111111,11111111,11111111);
> PINSEL9 |= BIN32(00001010,00000000,00000000,00000000);
> PINMODE9&= BIN32(11110000,11111111,11111111,11111111);
> PINMODE9|= BIN32(00001010,00000000,00000000,00000000);
> PINSEL11&= BIN32(11111111,11111111,11111111,11110000);
> PINSEL11|= BIN32(00000000,00000000,00000000,00001111);
> // Init GLCD cotroller
>
>
>
>

Hi Nico,

what compiler are you using?
I'm using the IAR kickstart edition and the samples from olimex work without any modification

I was able to display images on the LCD and use the touch screen

________________________________
From: Nico Bollen
To: l...
Sent: Tuesday, May 26, 2009 6:27:28 AM
Subject: [lpc2000] Re: LPC2478-STK LCD setup pins

Hi,

I don't think that's intentional, in fact I did not do that in my code.
Did you get your LCD displaying a picture? I'm still struggling with the EMC and my RAM. You may email me so we can exchange our code samples...

Best regards,
Nico

--- In lpc2000@yahoogroups .com, Daniel P wrote:
>
> Hi All,
>
> I was looking through the code for initializing the LCD
> All the PINSEL were set to the LCD function where needed
> and All the PINMODE were set to"neither pull-up nor pull-down"
>
> except for PINMODE0 bit 18:19 is set to pullup, that is pin P0[9]
>
> is that intentional?
>
> thanks
> void GLCD_Init (const Int32U *pPain, const Int32U * pPallete)
> {
> pInt32U pDst = (pInt32U) LCD_VRAM_BASE_ ADDR;
> // Assign pin
> PINSEL0 &= BIN32(11111111, 11110000, 00000000, 11111111) ;
> PINSEL0 |= BIN32(00000000, 00000101, 01010101, 00000000) ;
> PINMODE0&= BIN32(11111111, 11111100, 00000000, 11111111) ;
> PINMODE0|= BIN32(00000000, 00000010, 10101010, 00000000) ;
> PINSEL3 &= BIN32(11110000, 00000000, 00000000, 11111111) ;
> PINSEL3 |= BIN32(00000101, 01010101, 01010101, 00000000) ;
> PINMODE3&= BIN32(11110000, 00000000, 00000000, 11111111) ;
> PINMODE3|= BIN32(00001010, 10101010, 10101010, 00000000) ;
> PINSEL4 &= BIN32(11110000, 00110000, 00000000, 00000000) ;
> PINSEL4 |= BIN32(00000101, 01001111, 11111111, 11111111) ;
> PINMODE4&= BIN32(11110000, 00110000, 00000000, 00000000) ;
> PINMODE4|= BIN32(00001010, 10001010, 10101010, 10101010) ;
> PINSEL9 &= BIN32(11110000, 11111111, 11111111, 11111111) ;
> PINSEL9 |= BIN32(00001010, 00000000, 00000000, 00000000) ;
> PINMODE9&= BIN32(11110000, 11111111, 11111111, 11111111) ;
> PINMODE9|= BIN32(00001010, 00000000, 00000000, 00000000) ;
> PINSEL11&= BIN32(11111111, 11111111, 11111111, 11110000) ;
> PINSEL11|= BIN32(00000000, 00000000, 00000000, 00001111) ;
> // Init GLCD cotroller
>
>