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?
You can refer the led_blinky demo.
LPCOpen Software for LPC17XX | NXP Semiconductors
Hope this will help you.
BR
Hang