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.

interfacing External Pushbutton to MSP430 Launch pad

Other Parts Discussed in Thread: MSP430G2553

Hai,

i am trying to interface external pushbutton to MSP430launchpad to switch on and off launch pad LED. when i am pressing my pushbutton, the main program has to jump to ISR and make the LED ON/OFF but when i pressing push button it is not jumping to ISR. Why..??

This is my code:


#include "msp430g2553.h"

void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop Watchdog Timer
P1DIR |= BIT0; // P1.0 as Output


P1DIR &=~ BIT4;
P1IE |= BIT4; // P1.4 Interrupt Enable
P1IES |= BIT4; // Interrupt Edge Select (High to Low)
P1REN |= BIT4; // Resistor Enable
P1OUT |= BIT4; // Pull Up Resistor at 1.4
P1IFG = 0; // Clear Interrupt

_bis_SR_register (GIE); // Enable General Interrput bit

while (1);
}

#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void)
{
P1OUT ^= BIT0; // Toggle LED
P1IFG = 0; // Clear the interrupt
}

external pushbutton connection.

**Attention** This is a public forum