我的代码如下:
P1OUT &= ~0x80;
__delay_cycles(400);
while (!(UCB0IFG&UCTXIFG)); // USCI_B0 TX buffer ready?
UCB0TXBUF =cmd; // Send first value
while (!(UCB0IFG&UCTXIFG)); // USCI_B0 TX buffer ready?
UCB0TXBUF =reg; // Send first value
while (!(UCB0IFG&UCTXIFG)); // USCI_B0 TX buffer ready?
UCB0TXBUF =addr; // Send first value
while (!(UCB0IFG&UCTXIFG)); // USCI_B0 TX buffer ready?
UCB0TXBUF =addr; // Send first value
//__no_operation();
// __delay_cycles(400);
P1OUT |=0x80;
}
然后示波器的时钟图像如下
为什么我的代码是连续4次触发UCBOTX但是时钟确实分成部分,不是连续的求解!!谢谢!
