P3SEL |= BIT1+BIT3+BIT5+BIT7; // P3.1,3 USCI_B0 op
tion select
P3DIR |= BIT1+BIT3+BIT5+BIT7;
// Enable USART0 SPI mode
UCTL0 |= SWRST;
UCTL0 |= CHAR + SYNC + MM+SWRST; // 8-bit SPI Master **SWRST**
UTCTL0 |=CKPH+SSEL1+SSEL0+STC ; // SMCLK, 3-pin mode
UBR00 = 0x04 ; // UCLK/4
UBR10 = 0x00; // 0
UMCTL0 = 0x00; // no modulation
ME1 |= USPIE0;
IFG1 &= ~URXIFG0;
IE1 &= ~URXIE0;
UCTL0 &= ~SWRST; // Ini talize USART state machine
哪里有问题呀?为什么就是测不到通讯的波形呢,什么也看不到,时钟波形也没有,输出波形也没有
一周热门 更多>