#include void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer P1DIR |= 0x01; // Set P1.0 to output direction P1DIR |= 0x40; P1IE |= 0x20; // P1.5 interrupt enabled P1IFG &= ~0x20; // P1.5 IFG cleared P1IE |= 0x08; // P1.3 interrupt enabled P1IFG &= ~0x08; // P1.3 IFG cleared P1IE |= 0x10; // P1.4 interrupt enabled P1IFG &= ~0x10; // P1.4 IFG cleared __BIC_SR(LPM0 + LPM1 + LPM2 + LPM3 + LPM4)// Alle Low-Power Modes ausschalten->Active Mode ON _BIS_SR(GIE); // General Interrupt enabled } // Port 1 interrupt service routine #pragma vector=PORT1_VECTOR __interrupt void Port_1(void) { if (P1IFG & 0x20) { P1OUT |= 0x40; P1IFG &= ~0x20; } if (P1IFG & 0x08) { P1OUT |= 0x01; P1IFG &= ~0x08; } if (P1IFG & 0x10) { P1OUT &= ~0x01; P1OUT &= ~0x40; P1IFG &= ~0x10; } }