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.

求助MSP430F247串口发不出数据(示例程序也不行)

#include "msp430x24x.h"
int i;
char data[6]="MSP430";

void init(void)
{

P3OUT &= ~(BIT4+BIT5);
P3SEL = 0x30; // P3.4,5 = USCI_A0 TXD/RXD
UCA0CTL1 |= UCSSEL_1; // CLK = ACLK
UCA0BR0 = 0x03; // 32kHz/9600 = 3.41
UCA0BR1 = 0x00; //
UCA0MCTL = UCBRS1 + UCBRS0; // Modulation UCBRSx = 3
UCA0CTL1 &= ~UCSWRST;
}
void main (void)
{
WDTCTL = WDTPW + WDTHOLD;
init();
_EINT();
for(i=0;i<=6;i++)
{
UCA0TXBUF=data[i];
while((IFG2&UCA0TXIFG)==0);
}

}

使用的是Proteus软件,用范例程序还是不能发出数据