This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: Switch interupt

Part Number: MSP430G2553

Hello,

         I am trying to program MSP430g2553 MCU to do something when i press the tactile (Internal interrupt) switch for 2 - 3 seconds continuously.  Can you please help me how can i program the interrupt code. 

Code :

# pragma vector=PORT2_VECTOR
__interrupt void port_2(void)
{

j_delay++;

P2IFG &= ~BIT3; 


  if(j_delay > 50000)     
 {
       j_delay=0;

      x=0;    //enable program2
 }

}

Thanks and regards.

         

**Attention** This is a public forum