use the ADC pins as GPIO pins

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by ianLWD on Wed Apr 22 01:33:01 MST 2015
Hello all,

I need your help.
I've been trying to use the ADC pins of the OM13012 demo board (LPC11C24) as IO pins.
I tried to use these pins like other GPIOss but they dont work the same.
I'm trying to make a 6 digits 14 segments display using multiplexing.
still, I need more pins for other purposes for my project.

I also use the onboard can transceiver.

On this forum I found this :

I used the following code in main(void):

LPC_SYSCON->SYSAHBCLKCTRL |= (1<<16);  //set IOCON clock
LPC_IOCON->R_PIO1_1 |= 0x01; //set pin function to 1 = GPIO
GPIOSetDir(1, 1, 1);//set GPIO out

I have include "LPC11xx.h" to my project.

I get the errors:
       'LPC_IOCON_T' has no member named 'R_PIO1_1'
       'LPC_SYSCON' undeclared (first use in this function)

can anyone tell me what I am doing wrong?

kind regards,