This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hardware UART G2553 on LaunchPad rev 1.4

Other Parts Discussed in Thread: MSP430G2553

Hello, 

I'm trying to establish serial communication between my PC and the G2553 using hardware UART.

My launchPad is rev 1.4, so I crossed-connected the 2 jumpers (TXD and RXD) on J3.

I run the follownig code (which I found in MSP examples):

#include "msp430g2553.h"

void main(void)

{
WDTCTL = WDTPW + WDTHOLD;    // Stop WDT
BCSCTL1 = CALBC1_1MHZ;               // Set DCO
DCOCTL = CALDCO_1MHZ;
P1SEL = BIT1 + BIT2 ;                         // P1.1 = RXD, P1.2=TXD
P1SEL2 = BIT1 + BIT2 ;                       // P1.1 = RXD, P1.2=TXD
UCA0CTL1 |= UCSSEL_2;                   // SMCLK
UCA0BR0 = 104;                                  // 1MHz 9600
UCA0BR1 = 0;                                      // 1MHz 9600
UCA0MCTL = UCBRS0;                      // Modulation UCBRSx = 1
UCA0CTL1 &= ~UCSWRST;              // **Initialize USCI state machine**
IE2 |= UCA0RXIE;                                 // Enable USCI_A0 RX interrupt

__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, interrupts enabled
}

// Echo back RXed character, confirm TX buffer is ready first
#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR(void)
{
while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = '!';
}

Then, I tried to read the '!' using various terminal programs (Putty, Tera-terminal, Parallax-Serial-Terminal). I used two different launchpads, one connected in COM3 and the other in COM5.

However, I get the message "Cannot open port..." from these programs.

Sometimes I also get the message: "Error initializing emulator: Could not find MSP-FET430UIF on specified COM port " from Code Composer, and it takes 3-4 times before I can upload my code to the board.

I tried using the software UART and it works fine. I don't know what I'm doing wrong!!!

**Attention** This is a public forum