GPIO program for LPC812

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 18, 2016 by lpcware
Content originally posted in LPCWare by karthigowri on Mon Mar 28 21:33:08 MST 2016
  I have LPC812 controller and want to access the GPIO without using existing GPIO functions form LPCOPEN.I tried the coding for generating output from Pin P0_17. But i did not get the output.pls help me..........

My coding is....

void GPIO_Initialize(void)
LPC_SYSCTL->SYSAHBCLKCTRL |= 1<<6;   //enable clock for GPIO registers

LPC_SWM->PINENABLE0 |= 0xFFFF;  //Enable default function (GPIO)

LPC_GPIO_PORT->DIR[0] |= ((1<<17));//make pins P0_17 as Output


int main()

LPC_GPIO_PORT->PIN[0] = 1<<17;  //Set high to pin P0_17