Hi
I want to some basic projects with msp430g2553. I bought msp430 launchpad.
and I write some codes.
This is my code.
#include "msp430G2553.h"
;-------------------------------------------------------------------------------
ORG 0F800h ; Program Reset
;-------------------------------------------------------------------------------
RESET mov.w #0280h,SP ; Initialize stackpointer
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; WDT Durdur
SetupP1 mov.b #001h,&P1DIR
mov.b #008h,&P1OUT ; P1.3 set, else reset
bis.b #008h,&P1REN ; P1.3 pullup
bis.b #008h,&P1IE ; P1.3 Interrupt enabled
bis.b #008h,&P1IES ; P1.3 hi/low edge
bic.b #008h,&P1IFG ; P1.3 IFG Cleared
bis.b #010h,&P2IE ; P1.3 Interrupt enabled
bis.b #010h,&P2IES ; P1.3 hi/low edge
bic.b #010h,&P2IFG ; P1.3 IFG Cleared
;
Mainloop bis.w #LPM4+GIE,SR ;
nop
;
;-------------------------------------------------------------------------------
P1_ISR;
;-------------------------------------------------------------------------------
xor.b #001h,&P1OUT
bic.b #008h,&P1IFG ;
reti
;-------------------------------------------------------------------------------
P2_ISR;
;-------------------------------------------------------------------------------
xor.b #001h,&P1OUT
bic.b #010h,&P2IFG
reti ;
;
;-------------------------------------------------------------------------------
; Interrupt Vectors.
;-------------------------------------------------------------------------------
ORG 0FFFEh ; MSP430 RESET Vector
DW RESET ;
ORG 0FFE4h ; P1.x Vector
DW P1_ISR
ORG 0FFE6h ; P1.x Vector
DW P2_ISR ;
END
When I am using one button I have no problem. But I wont to more buttons. Example in my code. When I use P1.3 button. P1.0 active or I pressed P1.4 button P1.0 active.
But I am doing P1.3 button but P1.4 button isnt working.
Thanks u