Hello
I have a small program for the Launchpad G2553 which sends data over the Launchpad's USB serial connection. When I configure it to run at 9600 baud via the onboard RXD/TXD pins it works. However, when I try to increase the speed to 115200 baud, I just get a few garbage characters on the serial terminal software on my PC.
My guess is that it is too fast of a baud rate for a board w/o a crystal. Is this true, and if so what is the maximum non-crystal baud rate I could use? Also does anyone have a code sample of a setup for 115200 with and without a crystal? Below is what I am using on my Launchpad... I got it from the "MSP430G2xx3 Code Examples" zip file download from TI.
Thanks
Matt
/* Clock setup */ WDTCTL = WDTPW | WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_1MHZ; // Run at 1 MHz DCOCTL = CALDCO_1MHZ; // Run at 1 MHz /* USCI setup */ P1SEL = BIT1 + BIT2; // Set pin modes to USCI_A0 P1SEL2 = BIT1 + BIT2; // Set pin modes to USCI_A0 P1DIR |= BIT2; // Set 1.2 to output UCA0CTL1 |= UCSSEL_2; // USCI_A use SMCLK UCA0BR0 = 8; // 1 MHz -> 115200 UCA0BR1 = 0; // 1 MHz -> 115200 UCA0MCTL = UCBRS2 + UCBRS0; // Modulation UCBRSx = 5 UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine** IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt