gpio functioning

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

gpio functioning

827件の閲覧回数
nelvijohn
Contributor I

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

ラベル(1)
0 件の賞賛
2 返答(返信)

579件の閲覧回数
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 件の賞賛

579件の閲覧回数
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 件の賞賛