Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: SPI baud rate and 16 MHz Microcontroller

$
0
0
Thank you so much for your answer. So if have MCLK to 16 MHz can get a baud rate 16MHz SPI thus: P3DIR |= 0x01; P3OUT |= 0x01; P3SEL |= 0x0E; UCB0CTL1 |= UCSWRST; UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCMODE_0 + UCSYNC; UCB0CTL0 &= ~UCCKPL; //PH=1;PL=0 UCB0CTL0 &= ~UC7BIT; UCB0CTL1 |= UCSSEL_1; UCB0BR0 |= 0x01; //16MHz UCB0BR1 = 0x00; UCB0CTL1 &= ~UCSWRST; Right? I can put MCLK to 16 MHz in this way? BCSCTL1 |= XTS; BCSCTL3 = 0x20; do { IFG1 &= ~OFIFG; for (i=0xFF; i > 0; i--); } while((IFG1 & OFIFG)); BCSCTL2 = SELM_3; appreciate your attention greetings

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>