GPIO CONFIGURATOIN IN LPC845 BREAKBOARD

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

GPIO CONFIGURATOIN IN LPC845 BREAKBOARD

161件の閲覧回数
DHARSAN
Contributor I

Hi,

    How to configure GPIO in LPC845 to toggle LED?

    As I already work with existing configuration in 2 ways that I have mentioned below which gives error as undeclared. The first configuration didn't gave any error but led not toggling. The second configuration gave error. Kindly send the correct one.

1.)

SYSCON->SYSAHBCLKCTRL1 |=(1<<20); //CLOCK FOR GPIO PORT 1

GPIO->DIR[1] |=(1<<2);       //DIR PIN FOR GPIO PORT 1 PIN 2 (RED LED)

GPIO->NOT[1] |=(1<<2);       //TOGGLING  PORT 1 PIN 2 (RED LED)

2.)

LPC_SYSCON->SYSAHBCLKCTRL1 |=(1<<20);  //CLOCK FOR GPIO PORT 1

LPC_GPIO_PORT->DIR[1] |=(1<<2);    //DIR FOR GPIO PORT 1 PIN 2 (RED LED)

LPC_GPIO_PORT->NOT[1] |=(1<<2);     //TOGGLING  PORT 1 PIN 2 (RED LED) 

0 件の賞賛
返信
1 返信

132件の閲覧回数
Pablo_Ramos
NXP Employee
NXP Employee

Hi @DHARSAN 
There is a demo that you can take as reference in the SDK of lpc845breakout.

Pablo_Ramos_0-1714422662757.png

Hope it helps you!

0 件の賞賛
返信