This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GPIO Configuration Issue on LPC1768 Microcontroller with Keil IDE

Hello,

I am working on the LPC1768 microcontroller through Keil IDE. I am just trying to set the pin P1.14 high which is connected to an LED on the development board which I am using. This is my code:

#include <lpc17xx.h>

int main(void) {
    SystemInit();
    SystemCoreClockUpdate();

    LPC_PINCON->PINSEL2 &= ~((1 << 29) | (1 << 28));  
    LPC_GPIO1->FIODIR |= (1 << 14);                  
    LPC_GPIO1->FIOSET = (1 << 14);                  

    while (1) {}
}

I generated the .hex file and loaded it onto the microcontroller's flash memory using the Flash Magic tool. However, I am unable to turn on the LED with the above code. Instead of the LED, I tried setting a different pin as a GPIO pin and setting the output high, but that didn't work either. What am I missing? 

Parents Reply Children
No data