- Tue Feb 16, 2010 12:24 am
#93611
Hello.
I am trying to connect an external button to the msp430fg4618
its a standard button 3 pins (common,normally open, normally close).
i am also using a 2x1.5 volt batteries.
the hardware was connect like so:
power source to the common, normally open pin to PORT6.0, and MSP to ground.
the software:
P6SEL &= ~0x01; // port6.0
P6DIR &= ~0x01; // port6.0 as input.
this is basically it.
now, when i press to button i get that P6IN = 0x03 meaning port6.0 and 6.1 gets logic "1", when i want only port6 to get "1".
when i connect to port 6.2 i get the 6.0 & 6.1 & 6.2 gets "1".
what am i doing wrong ???
thanks.
I am trying to connect an external button to the msp430fg4618
its a standard button 3 pins (common,normally open, normally close).
i am also using a 2x1.5 volt batteries.
the hardware was connect like so:
power source to the common, normally open pin to PORT6.0, and MSP to ground.
the software:
P6SEL &= ~0x01; // port6.0
P6DIR &= ~0x01; // port6.0 as input.
this is basically it.
now, when i press to button i get that P6IN = 0x03 meaning port6.0 and 6.1 gets logic "1", when i want only port6 to get "1".
when i connect to port 6.2 i get the 6.0 & 6.1 & 6.2 gets "1".
what am i doing wrong ???
thanks.