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)
Hi @DHARSAN
There is a demo that you can take as reference in the SDK of lpc845breakout.
Hope it helps you!