gpio functioning

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gpio functioning

817 Views
nelvijohn
Contributor I

let me know about how to make a gpio to read its pin status for lpc1857

Labels (1)
0 Kudos
2 Replies

569 Views
nelvijohn
Contributor I

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.

0 Kudos

569 Views
soledad
NXP Employee
NXP Employee

Hi,

Which IDE are you using?

Are you using LPCOpen?

According with the reference manual:

pastedImage_1.png

pastedImage_2.png

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos