This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

uart msp4305529

Other Parts Discussed in Thread: MSP-EXP430F5529LP

Dear sir,

I am trying with msp4305529 UART program,but i am not getting the output on hyperterminal.Please go throgh the attachment.

thank you

prgm.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "msp430.h"
char data1[]={"lets play \r\n"};
char data2[]={"hello guys how are you \r\n"};
void uart_init( void )
{
P3SEL |= BIT3+BIT4; // P3.3,4 = USCI_A0 TXD/RXD
UCA0CTL1 |= UCSWRST; // **Put state machine in reset**
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 9; // 1MHz 115200 (see User's Guide)
UCA0BR1 = 0; // 1MHz 115200
UCA0MCTL |= UCBRS_1 + UCBRF_0; // Modulation UCBRSx=1, UCBRFx=0
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
UCA0IE |= UCRXIE; // Enable USCI_A0 RX interrupt
}//Initialize USCI state machine
void uart_send_byte( unsigned char data )
{
while (!(UCA0IFG&UCTXIFG)); // USCI_A0 TX buffer ready?
UCA0TXBUF = data;//The transmit data buffer holds the data waiting to be moved into the transmit shift register
}
void main(void)
{
unsigned int i=0,j=0;
WDTCTL = WDTPW + WDTHOLD; // Stop Watchdog timer
uart_init();
while( 1 )
{
for (i=0; i<14; i++)
{
uart_send_byte( data1[i] );
}
for(j=0;j<25;j++)
{
uart_send_byte(data2[j]);
}
__bis_SR_register( LPM3_bits + GIE );
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

**Attention** This is a public forum