let me know about how to make a gpio to read its pin status for lpc1857
Hi Soledad,
I have seen this user manual. I am using MDK5. Initially, the pin is configured as gpio input.
GPIO_SetDir(4,11,GPIO_DIR_INPUT); // GPIO direction
SCU_PinConfigure(4,11, SCU_PIN_CFG_INPUT_BUFFER_EN ); //Input buffer enable
if(!(GPIO_PinRead(4,11)))
{
// do neccessary
}
but it is always reading the status as 0 even the corresponding pin is in high state.
Hi,
Which IDE are you using?
Are you using LPCOpen?
According with the reference manual:
Please check the following thread an let me know if this helps.
Simple Port / Register reading and writing. | www.LPCware.com
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------