Hi,
I would like to learn how to toggle a GPIO in the LPC845-brk without high-level sw.
Can you tell me how to know where each pin is mapped in this port register?
For instance which bit i have to set to 1 to put the PIO1_0 pin high?
Thanks in advance
Hi Pavan,
Thanks for your reply.
Can you tell me also how to modify a single bit of a register while debugging in MCUxpresso?
Dear @tomato ,
Please Click on the View Menu and Select the Routing Details in that drop down. In that you can select the GPIO state mauvely.
Thank You,
B Pavan Kumar
Hai @tomato
GPIO Toggle
1. Initialize the Switch matrix CLK. (SYSCON->SYSAHBCLKCTRL0 |= (0x01 << 7);)
2. Initialize the GPIO Direction (GPIO->DIR[0] |=(1<<1);)
3. DE initialize the Switch matrix CLK. (SYSCON->SYSAHBCLKCTRL0 &=~ (0x01 << 7);)
3. in While (1)
{
delay(500) // Some delay of 500ms
GPIO->PIN[0] ^=(1<<1);
}
Thank You,
B PAVAN KUMAR