This is my init code. void UART_INIT() { P1SEL= RXD+TXD; P1SEL2= RXD+TXD; DCOCTL = 0; // Select lowest DCOx and MODx settings BCSCTL1 = CALBC1_1MHZ; // Set DCO DCOCTL = CALDCO_1MHZ; UCA0CTL1 |= UCSSEL_2; UCA0CTL0 = 0x00; UCA0BR0=104; // presacalar value for BAUD rate generator 9600 bps (1MHZ/104=9600) UCA0BR1=0; UCA0CTL1 &=~UCSWRST; //initialize USCI state machine UCA0MCTL=UCBRS0; // modulation UCBRSx=1 __bis_SR_register(CPUOFF + GIE); // Enter LPM0 w/ int until Byte RXed }
↧