how to program the SW3 and SW4 in LPC 1769

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

how to program the SW3 and SW4 in LPC 1769

649 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc1769 on Wed Oct 10 06:10:57 MST 2012
hi i have no idea on how to initialise this 2 switch on the embedded artist board coupled with lpc 1769.

anyone able to help?
SW3 and SW4.
0 Kudos
3 Replies

436 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Oct 13 01:18:06 MST 2012

Quote: lpc1769
u have any idea how to code them to stop the program or act as an interrupt?



A simple forum search ;) leads me to a sample someone posted to read a GPIO here :eek:

http://knowledgebase.nxp.com/showthread.php?t=2417:


Quote:

#define SWITCH (1 << 26)            //SWITCH input P0.26

LPC_GPIO0->FIODIR &=~SWITCH;        //set input
LPC_GPIO0->FIOSET |= SWITCH;        //set high
...
if(LPC_GPIO0->FIOPIN & SWITCH)        //get pin
{
//damned, pin is still high :mad:
}                               
else
{
//wow, it's pulled low :)
}

0 Kudos

436 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpc1769 on Fri Oct 12 23:57:43 MST 2012

Quote: Zero
And I have no idea which switches you are talking about :confused:

My LPC1769 User Manual doesn't describe this switches ;)



hihi,

actually i was refering to the lpc1769 with the embedded artist main board.
having a very hard time with this 2 switches.. SW3 and SW4.

u have any idea how to code them to stop the program or act as an interrupt?
0 Kudos

436 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed Oct 10 10:46:04 MST 2012

Quote: lpc1769
hi i have no idea on how to initialise this 2 switch.



And I have no idea which switches you are talking about :confused:

My LPC1769 User Manual doesn't describe this switches ;)
0 Kudos