We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm not able to make it work the GPIO P1.0-P1.3 of LPC1114. Both in hardware as in keil debug the GPIO's P1.0 dont clear.
int main() { /* Enable AHB clock to the GPIO domain. */ LPC_SYSCON->SYSAHBCLKCTRL |= (0x1UL << 16); /* enable clock for IOCON */ LPC_SYSCON->SYSAHBCLKCTRL |= (0x1UL << 6); /* enable clock for GPIO */ LPC_IOCON->R_PIO1_0 |= 0x01; /* P1.0 as GPIO */ LPC_GPIO1->DIR |= (1UL << 0); /* P1.0 as GPIO */ LPC_GPIO1->DATA &= ~(1UL << 0); /* Clear P1.0 */ //*********Don't work while(1); }
what's wrong with this code?