Hi,
i tried configuring the controller for uart communication.The code doesn't seem to work.Please help me with this.
my code is shown below:
#include<msp430.h>
#include<msp430fr6989.h>
void main()
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
PMMCTL0 = PMMPW; // Open PMM Module
PM5CTL0 &= ~LOCKLPM5;
CSCTL0=0XA500;
CSCTL1=0X000C;
// CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK ;
// CSCTL3=DIVA__1 | DIVS__1 | DIVM__1;
CSCTL2=0X0033;
CSCTL3=0;
UCA0CTLW0|=0X0081;
UCA0BRW=3;
UCA0MCTLW|=0X4900;
UCA0CTLW0=0;
/* P4SEL1|=0X04;
P4SEL0=0X00;
P4DIR|=0X04;*/
P2SEL1|=0X01;
P2SEL0=0X00;
P4SEL1|=0X08;
P4SEL0=0X00;
P2DIR|=1;
P4DIR=0;
while(1)
{
UCA0TXBUF='A';
while(UCTXIFG!=1);
}
}