HAI
i am using p1.3 as a switch so that when i push it..it generates the interrupt and in the port ISR..i m sending a character by UART...i m getting the output...but sometimes the character is transmitted twice or thrice...
i am using the below code..what should be done to avoid this problem..need help from you all..
void main(void) {
WDTCTL = WDTPW + WDTHOLD;
BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;
P1SEL = BIT1 + BIT2 ;
P1SEL2 = BIT1 + BIT2 ;
.
.
.
.//UART initialisation
P1SEL &= ~0x08;
P1DIR &= ~0x08;
P1REN |= 0x08;
P1IE |= 0x08;
P1IFG &= ~0x08;
_BIS_SR(LPM0_bits+GIE);
}
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void) {
P1IFG &= ~0x08;
while (!(IFG2 & UCA0TXIFG));
UCA0TXBUF = 'a';
}
thanks in advance
senthil.