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

LPC1114 GPIO

In LPC1114 if we configure P0_10,P0_11,P1_0,P1_1,P1_2,P1_3 these pins as GPIO , and toggle simulator wont show changes in status bit , same things happens if we check in actual hardware.
Same snap of code work fine in LPCxpresso.

Please help us to resolve issue
Thanks in Advance

Mahesh M

Parents
  • Sorry

    Please find code below

    #define P1_0    (unsigned short)(1<<0)
    
    int main(void)
    {
            SystemInit();
            LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6);
    
            LPC_IOCON->PIO1_0 &= ~0x07;     //Configure as IO
            LPC_IOCON->PIO1_0 |= 0x01;
            LPC_GPIO0->DIR    |= P1_0;      //Configure as Output
            while(1)
            {
                    LPC_GPIO1->DATA &= ~P1_0;        //Clear Bit
                    LPC_GPIO1->DATA |=  P1_0;    //Set Bit
            }
    }
    

Reply
  • Sorry

    Please find code below

    #define P1_0    (unsigned short)(1<<0)
    
    int main(void)
    {
            SystemInit();
            LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6);
    
            LPC_IOCON->PIO1_0 &= ~0x07;     //Configure as IO
            LPC_IOCON->PIO1_0 |= 0x01;
            LPC_GPIO0->DIR    |= P1_0;      //Configure as Output
            while(1)
            {
                    LPC_GPIO1->DATA &= ~P1_0;        //Clear Bit
                    LPC_GPIO1->DATA |=  P1_0;    //Set Bit
            }
    }
    

Children
No data