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

Forum Post: RE: I want to receive a string or a character through UART in msp430g2553 but not able to receive even a single character it. If a character arrives my IFG2 flag is not getting set so what should i do in this code ?

$
0
0
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 }

Viewing all articles
Browse latest Browse all 62309

Trending Articles



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