LPC84x GPIO registers

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

LPC84x GPIO registers

629 Views
tomato
Contributor III

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?

tomato_0-1671630443534.png

For instance which bit i have to set to 1 to put the PIO1_0 pin high?

Thanks in advance

 

 

0 Kudos
Reply
3 Replies

603 Views
tomato
Contributor III

Hi Pavan,

 

Thanks for your reply.

Can you tell me also how to modify a single bit of a register while debugging in MCUxpresso?

tomato_0-1671710192115.png

 

0 Kudos
Reply

585 Views
PK_1114
Contributor II

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

PK_1114_1-1671803173788.png

 

0 Kudos
Reply

613 Views
PK_1114
Contributor II

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

0 Kudos
Reply