/**************************************************************** 串口发送字符串函数 ****************************************************************/ void UartTX_Send(unsigned char *Data,int len) { int j; for(j=0;j<len;j++) { while (!(UCA1IFG&UCTXIFG)); UCA1TXBUF =*Data++; } }
根据datesheet上面写的: (UCTXBUFx) The transmit data buffer is user accessible and holds the data waiting to be moved into the transmit shift register and transmitted on UCAxTXD. Writing to the transmit data buffer clears UCTXIFG.
执行完UCA1TXBUF =*Data++; 之后UCTXIFG的值不是应该变成0了吗?可是单步调试值没有发生变化,为什么呢?
|