LPC1788 with SRAM connection issue??

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by AkshayHV on Fri Jan 23 01:01:25 MST 2015

I am using SRAM of 8 bit with my LPC1788 . I have doubt that can the data lines of SRAM can be connected from D16 to D23 instead of D0 to D7. because i want use those pins for my SDRAM connection.is it possible to intialize only D16 to D23 pins of SRAM and work in a 8 bit mode . i had a code where i tested the code with D0 to D7 first it worked perfectly. but when i tried the same from D16 to D23 its not working . init fucntion  I am using is as below this init fucntion as it is worked for when i made use of D0 to D7 but when i change the it to D16 to D23 is there any configuration there to do such thing.

  void SRAMInit( void )
volatile uint32_t i;
volatile unsigned long Dummy;
#if 0
//data lines//
LPC_IOCON->P3_0 = 0x21;
LPC_IOCON->P3_1 = 0x21;
LPC_IOCON->P3_2 = 0x21;
LPC_IOCON->P3_3 = 0x21;
LPC_IOCON->P3_4 = 0x21;
LPC_IOCON->P3_5 = 0x21;
LPC_IOCON->P3_6 = 0x21;
LPC_IOCON->P3_7 = 0x21;
//data lines//
LPC_IOCON->P3_16 = 0x21;
LPC_IOCON->P3_17= 0x21;
LPC_IOCON->P3_18 = 0x21;
LPC_IOCON->P3_19= 0x21;
LPC_IOCON->P3_20= 0x21;
LPC_IOCON->P3_21= 0x21;
LPC_IOCON->P3_22= 0x21;
LPC_IOCON->P3_23= 0x21;
//address lines//
LPC_IOCON->P4_0 = 0x21;
LPC_IOCON->P4_1 = 0x21;
LPC_IOCON->P4_2 = 0x21;
LPC_IOCON->P4_3 = 0x21;
LPC_IOCON->P4_4 = 0x21;
LPC_IOCON->P4_5 = 0x21;
LPC_IOCON->P4_6 = 0x21;
LPC_IOCON->P4_7 = 0x21;
LPC_IOCON->P4_8 = 0x21;
LPC_IOCON->P4_9 = 0x21;
LPC_IOCON->P4_10 = 0x21;
LPC_IOCON->P4_11 = 0x21;
LPC_IOCON->P4_12 = 0x21;
LPC_IOCON->P4_13 = 0x21;
LPC_IOCON->P4_14 = 0x21;
LPC_IOCON->P4_15 = 0x21;
LPC_IOCON->P5_0 = 0x21;

LPC_IOCON->P4_24 = 0x21;
//LPC_IOCON->P4_25 = 0x21;

//LPC_IOCON->P4_31 = 0x00;
//LPC_GPIO4->DIR |= (1<<31);
//LPC_GPIO4->CLR = (1<<31);
LPC_IOCON->P4_30 = 0x21;

LPC_SC->PCONP   |= 0x00000800;
LPC_SC->EMCDLYCTL |= (8<<0);

LPC_SC->EMCDLYCTL |= (8<<16);
LPC_EMC->Config = 0x01;
LPC_EMC->StaticExtendedWait = 0x00;
LPC_EMC->StaticConfig0 = 0x80;
LPC_EMC->StaticWaitWen0 = 0x01;
LPC_EMC->StaticWaitOen0 = 0x01;
LPC_EMC->StaticWaitRd0 = 0x01;
LPC_EMC->StaticWaitWr0 = 0x01;
LPC_EMC->Control = 0x01;


Thanks in advance for replies

Akshay H V