Other Parts Discussed in Thread: MSP430FG6426, MSP-FET,
Tool/software: Code Composer Studio
Hello Guys,
I have MSP-TS430PZ100AUSB development board, MSP430FG6426 controller & MSP-FET for debugger tool. I need to establish a UART connection for communication MSP430 controller to PC for one of the project. I checked with other MSP430 FZ series they need a breakout board for establishing UART connection. However the MSP-FET has the UART communication option available. It is not clear to me if I need to use an additional break out board for UART connection or it can be done using MSP-FET. Also the MSP430FG6426 has UART BSL I think I can use this not sure though.
Also I have written a code activating the UART for MSP430FG6426. I am able to compile and debug this on the flash however I can't read any string output on the Teraterm on the PC.
[#include <msp430.h>
#include <string.h>
#include <stdio.h>
volatile char i=0;
void main(void)
{
char wel[]="Hi ! Good Morning !";
// stop WDT
WDTCTL= WDTPW | WDTHOLD;
P2SEL |= 0x03; // Assign P2.0 to UCA0TXD and...
P2DIR |= 0x03; // P2.1 to UCA0RXD
UCA0CTL1 |= UCSWRST; // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 6; // 1MHz 9600 (see User's Guide)
UCA0BR1 = 0; // 1MHz 9600
UCA0MCTL = UCBRS_0 | UCBRF_13 | UCOS16; // Modln UCBRSx=0, UCBRFx=0,
// over sampling
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
/
while (1)
{i=0;
while (wel[i]!='\0');
{
UCA0TXBUF = wel [i];
while (UCA0STAT&UCBUSY);
i++;
}
UCA0TXBUF = 0X0a;
while (UCA0STAT&UCBUSY);
UCA1TXBUF = 0X0d;
while (UCA0STAT&UCBUSY);
}
}
]
Can anyone recommend the resources on how do I make the UART communication for this microcontroller. Would be thankful.
Thanks.