串口UART及编程.pptVIP

  • 21
  • 0
  • 约9.38千字
  • 约 33页
  • 2017-07-05 发布于湖北
  • 举报
串口UART及编程

Uart_Port_Return(); //恢复口状态 } //-------------------------------------------------------------------------------------------------------------- // UART初始化 //-------------------------------------------------------------------------------------------------------------- void Uart_Init(int pclk,int baud) { int i; static int whichUart=0; if(pclk == 0) pclk = PCLK; //UART0 rULCON0 = 0x3; //正常模式,无效验,1个停止位,8个数据位 rUCON0 = 0x245; [10] [9] [8] [7] [6] [5] [4] [3:2] [1:0] //Clock Sel, Tx Int, Rx Int, Rx Time Out, Rx err,

文档评论(0)

1亿VIP精品文档

相关文档