MSP430 5438 串口发送

2019-03-24 13:39发布

/****************************************************************
串口发送字符串函数    
****************************************************************/
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了吗?可是单步调试值没有发生变化,为什么呢? 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
14条回答
Triton.zhang
2019-03-25 10:32
 精彩回答 2  元偷偷看……0人看过

一周热门 更多>

相关问题

    相关文章