LPC1768

Hello, I am new to LPC Microcontrollers and trying to program on my own. I want to write '1' to a particular Pin on LPC1768 that performs the function of SCK(Serial Clock). My question is, Do I need to always use PINSEL to select the pin before I use FIODIR and set the Pin.

Also what are difference between the statements below:

LPC_PINCON->FIODIR |= (1<<15);

LPC_GPIO0->FIODIR |= (1<<15);

LPC_GPIO0->FIODIR |= ((1<<15) | (1<<16));

LPC_GPIO2->FIODIR &= ~((1<<15) | (1<<16));

Thank you.

More questions in this forum