lpcware

PIO1_11 does not read correctly

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by syed on Wed Jun 15 10:00:05 MST 2011
Hi All,

            I am using LPC1114 in my project. I am trying to set PIO1_11 as digital input and and it does not read the correctly.

I have initialised the pin direction correctly which I can confirm using the debugger.  The pin is tied to a  3V3 line. [B]I am getting the pin status as low. The pin status read using the debugger is also low but I can see using [COLOR=Red]oscilloscope that its high[/COLOR][/B].

I have tried this on the LPC Expresso board (LPC1114)

#define HDW_IP_BTN_P_11_BIT            11
bool
GIO_get_p1_11(
    void
) {
    bool status;

    status = (LPC_GPIO1->DATA & ( 1 << HDW_IP_BTN_P_11_BIT)) ? FALSE : TRUE;
   
    return status;
}

Can anyone please let me know whats happening ?

Regards,
Syed

Outcomes