2553 CPU时钟是16M,现在想要改到9600,UCA0BR0 =?
UCA0CTL1 |= UCSSEL_2; // SMCLK ~ 4MHz
UCA0BR0 = 2; // 4MHz 115200 (Oversampling)
UCA0BR1 = 0; // 4MHz 115200 (Oversampling)
UCA0MCTL = UCBRF_2 + UCBRS_3 + UCOS16; // Modulation UCBRFx = 2, UCBRSx = 3 y Oversampling ON
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
|