This is my first time using msp430 series. I am using the MSP430FG4618 experimenter's board and I would like to have RS232 communication. After developing my own program, it doesn't work. Therefore, I tried with the TI sample code.
With the sample code from msp430xG46x_uscia0_uart_9600.c developed by TI, I still cannot transmit signal through RS232 via terminal. I don't know whether the setting in the program has something wrong or the hardware.
Can anyone give me help? I have tried to debug and the program can actually run into the interrupt.
volatile unsigned int i;
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
FLL_CTL0 |= XCAP18PF; // Configure load caps
P2SEL = BIT4|BIT5; // P2.4,5 = USCI_A0 RXD/TXD
UCA0CTL1 |= UCSSEL_1; // CLK = ACLK
UCA0BR0 = 0x03; // 32k/9600 - 3.41
UCA0BR1 = 0x00;
UCA0MCTL = 0x06; // Modulation
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE+UCA0TXIE; // Enable USCI_A0 RX interrupt
// Echo back RXed character, confirm TX buffer is ready first
__interrupt void USCIA0RX_ISR (void)
UCA0TXBUF = UCA0RXBUF; // TX -> RXed character
__interrupt void USCIA0TX_ISR (void)