Hi,
I have written a simple code to transmit a byte using UART of MSP430F5528, But when i run the code and open terminal to view the byte send it is full of garbage values appearing continuously. Below i the code , where am i going wrong??
#include <msp430.h> #include <msp430f5528.h> #include <stdio.h> void main (void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P4SEL |= 0x03; UCA1CTL1 |= UCSWRST; UCA1CTL0 = 0x00; UCA1CTL1 = 0x08; UCA1BR0 = 0x6D; UCA1BR1 = 0; UCA1MCTL = 0x04; UCA1CTL1 &= ~UCSWRST; /////////////sending bytes/////////// while (!(UCA1IFG & UCTXIFG)); // USART0 TX buffer ready? UCA1TXBUF = 0x41; while (!(UCA1IFG & UCTXIFG)); // USART0 TX buffer ready? UCA1TXBUF = 0x42; }