{"id":89390,"date":"2024-03-12T10:09:52","date_gmt":"2024-03-12T02:09:52","guid":{"rendered":"\/\/www.dealsbon.com\/?p=89390"},"modified":"2024-03-12T10:09:57","modified_gmt":"2024-03-12T02:09:57","slug":"ucktxxyxj-2","status":"publish","type":"post","link":"\/\/www.dealsbon.com\/blog\/89390.html","title":{"rendered":"UART\u4e32\u53e3\u901a\u4fe1\u534f\u8bae\u8be6\u89e3"},"content":{"rendered":"\n

\u3000\u3000UART(Universal Asynchronous Receiver\/Transmitter\uff0c\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668)<\/strong>\u662f\u4e00\u79cd\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u7684\u4e32\u884c\u901a\u4fe1\u534f\u8bae\u3002\u5b83\u652f\u6301\u5168\u53cc\u5de5\u901a\u4fe1\uff0c\u5373\u53ef\u4ee5\u540c\u65f6\u8fdb\u884c\u6570\u636e\u7684\u53d1\u9001\u548c\u63a5\u6536\uff0c\u8fd9\u4f7f\u5f97\u5b83\u5728\u9700\u8981\u53cc\u5411\u901a\u4fe1\u7684\u5e94\u7528\u573a\u666f\u4e2d\u975e\u5e38\u6709\u7528\u3002UART\u7684\u5de5\u4f5c\u539f\u7406\u662f\u9010\u4f4d\u4f20\u8f93\u6570\u636e\uff0c\u8fd9\u610f\u5473\u7740\u6bcf\u4e2a\u4e8c\u8fdb\u5236\u4f4d\u90fd\u662f\u72ec\u7acb\u5730\u901a\u8fc7\u4fe1\u53f7\u7ebf\u4f20\u8f93\u7684\u3002\u5728UART\u901a\u4fe1\u534f\u8bae\u4e2d\uff0c\u9ad8\u7535\u5e73\u901a\u5e38\u4ee3\u8868\u903b\u8f91\u201c1\u201d\uff0c\u800c\u4f4e\u7535\u5e73\u4ee3\u8868\u903b\u8f91\u201c0\u201d\u3002<\/strong><\/p>\n\n\n\n

\u3000\u3000UART\u534f\u8bae\u652f\u6301\u591a\u79cd\u6570\u636e\u4f4d\u914d\u7f6e\uff0c\u5305\u62ec5\u52308\u4e2a\u6570\u636e\u4f4d\uff0c\u4ee5\u53ca\u65e0\u6821\u9a8c\u3001\u5076\u6821\u9a8c\u548c\u5947\u6821\u9a8c\u9009\u9879\u3002<\/strong>\u6b64\u5916\uff0c\u5e27\u901a\u5e38\u7531\u4e00\u4e2a\u6216\u4e24\u4e2a\u505c\u6b62\u4f4d\u6765\u7ec8\u6b62\uff0c\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u6b63\u786e\u63a5\u6536\u3002UART\u534f\u8bae\u8fd8\u5141\u8bb8\u4f7f\u7528\u4e0d\u540c\u7684\u6ce2\u7279\u7387\u8fdb\u884c\u6570\u636e\u4f20\u8f93\uff0c\u4f46\u53d1\u9001\u7aef\u548c\u63a5\u6536\u7aef\u7684\u6ce2\u7279\u7387\u5fc5\u987b\u76f8\u8fd1\uff0c\u4ee5\u907f\u514d\u65f6\u5e8f\u5dee\u5f02\u5bfc\u81f4\u7684\u6570\u636e\u9519\u8bef\u3002\u4e24\u7aef\u7684UART\u8bbe\u5907\u8fd8\u5fc5\u987b\u914d\u7f6e\u76f8\u540c\u7684\u6570\u636e\u5305\u7ed3\u6784\uff0c\u624d\u80fd\u5b9e\u73b0\u6709\u6548\u7684\u6570\u636e\u4ea4\u6362\u3002<\/p>\n\n\n\n

\u3000\u3000UART\u534f\u8bae\u7684\u4e00\u4e2a\u91cd\u8981\u7279\u70b9\u662f\u5176\u7b80\u5355\u6027\u3002\u5b83\u4ec5\u4f7f\u7528\u4e24\u6839\u72ec\u7acb\u7684\u4fe1\u53f7\u7ebf(\u4e00\u6839\u7528\u4e8e\u53d1\u9001\uff0c\u53e6\u4e00\u6839\u7528\u4e8e\u63a5\u6536)\u548c\u4e00\u4e2a\u65f6\u949f\u4fe1\u53f7\u6765\u7ef4\u6301\u53cc\u65b9\u4e4b\u95f4\u7684\u540c\u6b65\u3002<\/strong>\u8fd9\u79cd\u8bbe\u8ba1\u7b80\u5316\u4e86\u786c\u4ef6\u8fde\u63a5\uff0c\u5e76\u964d\u4f4e\u4e86\u6210\u672c\u3002\u5c3d\u7ba1UART\u662f\u4e00\u79cd\u4f4e\u901f\u901a\u4fe1\u534f\u8bae\uff0c\u4f46\u5b83\u56e0\u5176\u7b80\u5355\u5b9e\u7528\u7684\u7279\u6027\uff0c\u5728\u5404\u79cd\u573a\u5408\u5f97\u5230\u4e86\u5e7f\u6cdb\u5e94\u7528\u3002<\/p>\n\n\n\n

\u3000\u3000UART\u662f\u4e00\u79cd\u57fa\u672c\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u4e32\u884c\u901a\u4fe1\u534f\u8bae\uff0c\u9002\u7528\u4e8e\u9700\u8981\u7b80\u5355\u3001\u9ad8\u6548\u4e14\u6210\u672c\u6548\u76ca\u9ad8\u7684\u53cc\u5411\u901a\u4fe1\u573a\u666f\u3002\u901a\u8fc7\u7406\u89e3\u5176\u5de5\u4f5c\u539f\u7406\u548c\u914d\u7f6e\u53c2\u6570\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6709\u6548\u5730\u5229\u7528UART\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u3002<\/p>\n\n\n\n

\"UART\"<\/figure>\n\n\n\n

\u3000\u3000\u4e00\u3001 UART\u534f\u8bae\u5728\u4e0d\u540c\u7c7b\u578b\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u7684\u5e94\u7528\u6848\u4f8b\u6709\u54ea\u4e9b?<\/h2>\n\n\n\n

\u3000\u3000UART\u534f\u8bae\u5728\u4e0d\u540c\u7c7b\u578b\u7684\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u7684\u5e94\u7528\u6848\u4f8b\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u4ee5\u4e0b\u51e0\u79cd\uff1a<\/p>\n\n\n\n

    \n
  • \u3000\u3000\u7269\u8054\u7f51\u9886\u57df<\/strong>\uff1aUART\u88ab\u5e7f\u6cdb\u4f7f\u7528\u4e8e\u4e32\u53e3\u901a\u4fe1\uff0c\u8bb8\u591a\u5fae\u63a7\u5236\u5668\u548c\u5355\u7247\u673a\u82af\u7247\u90fd\u96c6\u6210\u4e86UART\u786c\u4ef6\u6a21\u5757\uff0c\u7b80\u5316\u4e86\u4e32\u53e3\u901a\u4fe1\u7684\u5b9e\u73b0\u3002\u8fd9\u8868\u660e\u5728\u7269\u8054\u7f51\u8bbe\u5907\u4e2d\uff0cUART\u534f\u8bae\u7528\u4e8e\u5b9e\u73b0\u8bbe\u5907\u95f4\u7684\u901a\u4fe1\uff0c\u4ee5\u53ca\u4e0e\u5916\u90e8\u7cfb\u7edf\u7684\u6570\u636e\u4ea4\u6362\u3002<\/li>\n\n\n\n
  • \u3000\u3000\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e4b\u95f4\u7684\u901a\u8baf<\/strong>\uff1a\u901a\u8fc7UART\u5b9e\u73b0\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e4b\u95f4\u7684\u901a\u8baf\u662f\u4e00\u4e2a\u5178\u578b\u7684\u5e94\u7528\u573a\u666f\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u591a\u4e2aBlueFi\u5f00\u6e90\u677f\u73a9\u6570\u5b57\u63a5\u9f99\u6e38\u620f\u65f6\uff0c\u5c31\u6d89\u53ca\u5230\u4f7f\u7528UART\u8fdb\u884c\u7cfb\u7edf\u95f4\u7684\u901a\u8baf\u3002<\/li>\n\n\n\n
  • \u3000\u3000\u4f20\u611f\u5668\u6570\u636e\u8bfb\u53d6<\/strong>\uff1a\u5728\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\uff0cUART\u53ef\u4ee5\u7528\u4e8e\u4ece\u4f20\u611f\u5668\u4e2d\u8bfb\u53d6\u6570\u636e\u3002\u8fd9\u79cd\u5e94\u7528\u6848\u4f8b\u8bf4\u660e\u4e86UART\u5728\u5904\u7406\u5b9e\u65f6\u6570\u636e\u91c7\u96c6\u65b9\u9762\u7684\u5b9e\u7528\u6027\u3002<\/li>\n\n\n\n
  • \u3000\u3000UART\u8f6cCAN\u6a21\u5757\u7684\u5e94\u7528<\/strong>\uff1a\u5728\u67d0\u4e9b\u7279\u5b9a\u7684\u5e94\u7528\u573a\u666f\u4e0b\uff0c\u5982\u9700\u8981\u5c06UART\u534f\u8bae\u8f6c\u6362\u4e3aCAN\u534f\u8bae\u4ee5\u9002\u5e94\u4e0d\u540c\u7684\u901a\u4fe1\u9700\u6c42\u65f6\uff0c\u4f1a\u4f7f\u7528\u5230UART\u8f6cCAN\u6a21\u5757\u3002\u8fd9\u79cd\u8f6c\u6362\u6a21\u5757\u7684\u5e94\u7528\u6848\u4f8b\u5c55\u793a\u4e86UART\u534f\u8bae\u5728\u4e0d\u540c\u901a\u4fe1\u534f\u8bae\u95f4\u7684\u7075\u6d3b\u6027\u548c\u517c\u5bb9\u6027\u3002<\/li>\n\n\n\n
  • \u3000\u3000\u8bbe\u8ba1\u8d77\u6b62\u5f0f\u7684\u5e94\u7528\u5c42\u534f\u8bae<\/strong>\uff1aUART\u7684\u65f6\u5e8f\u7279\u6027\u4f7f\u5176\u6210\u4e3a\u8bbe\u8ba1\u8d77\u6b62\u5f0f\u5e94\u7528\u5c42\u534f\u8bae\u7684\u7406\u60f3\u9009\u62e9\u3002\u8fd9\u79cd\u5e94\u7528\u5c42\u534f\u8bae\u7684\u8bbe\u8ba1\u5229\u7528\u4e86UART\u5728\u6570\u636e\u901a\u4fe1\u8fc7\u7a0b\u4e2d\u7684\u4f20\u8f93\u5c42\u529f\u80fd\uff0c\u8fdb\u4e00\u6b65\u6269\u5c55\u4e86UART\u7684\u5e94\u7528\u8303\u56f4\u3002<\/li>\n<\/ul>\n\n\n\n

    \u3000\u3000UART\u534f\u8bae\u5728\u5d4c\u5165\u5f0f\u7cfb\u7edf\u4e2d\u7684\u5e94\u7528\u975e\u5e38\u5e7f\u6cdb\uff0c\u4ece\u7b80\u5355\u7684\u8bbe\u5907\u95f4\u901a\u4fe1\u5230\u590d\u6742\u7684\u7cfb\u7edf\u95f4\u901a\u8baf\uff0c\u518d\u5230\u6570\u636e\u91c7\u96c6\u548c\u534f\u8bae\u8f6c\u6362\u7b49\u65b9\u9762\u90fd\u6709\u5176\u72ec\u7279\u7684\u5e94\u7528\u573a\u666f\u3002\u8fd9\u4e9b\u5e94\u7528\u6848\u4f8b\u4e0d\u4ec5\u5c55\u793a\u4e86UART\u534f\u8bae\u7684\u7075\u6d3b\u6027\u548c\u9ad8\u6548\u6027\uff0c\u4e5f\u4f53\u73b0\u4e86\u5176\u5728\u73b0\u4ee3\u5d4c\u5165\u5f0f\u7cfb\u7edf\u5f00\u53d1\u4e2d\u7684\u91cd\u8981\u5730\u4f4d\u3002<\/p>\n\n\n\n

    \"UART\"<\/figure>\n\n\n\n

    \u3000\u3000\u4e8c\u3001 \u5982\u4f55\u914d\u7f6eUART\u4ee5\u652f\u6301\u9ad8\u6570\u636e\u901f\u7387\u548c\u4f4e\u529f\u8017?<\/h2>\n\n\n\n

    \u3000\u3000\u914d\u7f6eUART\u4ee5\u652f\u6301\u9ad8\u6570\u636e\u901f\u7387\u548c\u4f4e\u529f\u8017\uff0c\u9996\u5148\u9700\u8981\u4e86\u89e3UART\u7684\u57fa\u672c\u5de5\u4f5c\u539f\u7406\u548c\u7279\u6027\u3002UART(Universal Asynchronous Receiver\/Transmitter)\u662f\u4e00\u79cd\u5e7f\u6cdb\u4f7f\u7528\u7684\u4e32\u884c\u901a\u4fe1\u63a5\u53e3\uff0c\u5b83\u5141\u8bb8\u8bbe\u5907\u4e4b\u95f4\u8fdb\u884c\u5f02\u6b65\u901a\u4fe1\u3002\u5728\u914d\u7f6eUART\u65f6\uff0c\u9700\u8981\u8003\u8651\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n\n\n\n

      \n
    1. \u3000\u3000\u9009\u62e9\u5408\u9002\u7684\u6ce2\u7279\u7387<\/strong>\uff1a\u6ce2\u7279\u7387\u662f\u8861\u91cf\u6570\u636e\u4f20\u8f93\u901f\u7387\u7684\u6307\u6807\uff0c\u901a\u5e38\u4ee5\u6ce2\u7279(Baud)\u4e3a\u5355\u4f4d\u3002\u4e3a\u4e86\u652f\u6301\u9ad8\u6570\u636e\u901f\u7387\uff0c\u53ef\u4ee5\u9009\u62e9\u8f83\u9ad8\u7684\u6ce2\u7279\u7387\u3002\u4f8b\u5982\uff0cSTM32\u7684UART\u63a5\u53e3\u53ef\u4ee5\u652f\u6301\u9ad8\u8fbe2Mbps\u53ca\u81f34Mbps\u7684\u4f20\u8f93\u901f\u7387\u3002\u7136\u800c\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6ce2\u7279\u7387\u7684\u9009\u62e9\u8fd8\u53d7\u5230\u786c\u4ef6\u7535\u8def\u7684\u9650\u5236\uff0c\u5982\u5355\u7aef\u4fe1\u53f7\u4f20\u8f93\u7684\u7279\u6027\u53ef\u80fd\u4f1a\u9650\u5236\u4f20\u8f93\u901f\u5ea6\u548c\u8ddd\u79bb\u3002<\/li>\n\n\n\n
    2. \u3000\u3000\u4f4e\u529f\u8017\u6a21\u5f0f\u7684\u4f7f\u7528<\/strong>\uff1a\u4e3a\u4e86\u5b9e\u73b0\u4f4e\u529f\u8017\uff0c\u53ef\u4ee5\u5229\u7528\u7279\u5b9a\u7684\u4f4e\u529f\u8017UART\u6a21\u5f0f\u3002\u4f8b\u5982\uff0clpuart\u5141\u8bb8\u5728\u6709\u9650\u529f\u8017\u4e0b\u8fdb\u884c\u53cc\u5411UART\u901a\u4fe1\uff0c\u4ec5\u970032.768 kHz LSE\u65f6\u949f\u5373\u53ef\u8fdb\u884c\u9ad8\u8fbe9600\u6ce2\u7279\/s\u7684UART\u901a\u4fe1\u3002\u5f53lpuart\u7531\u4e0eLSE\u65f6\u949f\u4e0d\u540c\u7684\u65f6\u949f\u6e90\u9a71\u52a8\u65f6\uff0c\u53ef\u4ee5\u8fbe\u5230\u66f4\u9ad8\u7684\u6ce2\u7279\u7387\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6eUARTx_CR1.START\u4e3a1.\u9009\u62e9RXD\u4fe1\u53f7\u8d77\u59cb\u4f4d\u5224\u5b9a\u65b9\u5f0f\u4e3a\u4f4e\u7535\u5e73\uff0c\u5e76\u4f7f\u80fdUART\u63a5\u6536\u6765\u8fdb\u4e00\u6b65\u964d\u4f4e\u529f\u8017\u3002<\/li>\n\n\n\n
    3. \u3000\u3000\u6b63\u786e\u914d\u7f6e\u4e2d\u65ad\u548cDMA<\/strong>\uff1a\u4e3a\u4e86\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u6548\u7387\u548c\u54cd\u5e94\u901f\u5ea6\uff0c\u53ef\u4ee5\u4f7f\u7528DMA(Direct Memory Access)\u6765\u76f4\u63a5\u4eceUART\u8bfb\u53d6\u6570\u636e\u5230\u5185\u5b58\u6216\u53cd\u4e4b\u3002\u540c\u65f6\uff0c\u6b63\u786e\u914d\u7f6e\u4e2d\u65ad\u4e5f\u662f\u5fc5\u8981\u7684\uff0c\u4ee5\u4fbf\u53ca\u65f6\u5904\u7406\u63a5\u6536\u5230\u7684\u6570\u636e\u6216\u53d1\u9001\u5b8c\u6210\u7684\u901a\u77e5\u3002\u5728STM32\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7HAL_UART_MspDeInit\u51fd\u6570\u5173\u95edUART\uff0c\u91ca\u653e\u8d44\u6e90\u5e76\u51cf\u5c11\u529f\u8017\u3002<\/li>\n\n\n\n
    4. \u3000\u3000\u4f18\u5316\u786c\u4ef6\u8bbe\u8ba1<\/strong>\uff1a\u5728\u786c\u4ef6\u5c42\u9762\uff0c\u53ef\u4ee5\u901a\u8fc7\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u4fe1\u53f7\u7ebf\u3001\u4f7f\u7528\u66f4\u9ad8\u6548\u7684\u7535\u6e90\u7ba1\u7406\u7b56\u7565\u7b49\u65b9\u5f0f\u6765\u964d\u4f4e\u529f\u8017\u3002\u4f8b\u5982\uff0c\u5c06\u4e32\u884c\u9635\u5217\u5355\u5143(SAU)\u8bbe\u4e3aUART\u63a5\u6536\uff0c\u5e76\u5728SNOOZE\u6a21\u5f0f\u4e0b\u8fdb\u884c\u64cd\u4f5c\uff0c\u4e5f\u662f\u4e00\u79cd\u6709\u6548\u7684\u4f4e\u529f\u8017\u8bbe\u7f6e\u65b9\u6cd5\u3002<\/li>\n<\/ol>\n\n\n\n

      \u3000\u3000\u914d\u7f6eUART\u4ee5\u652f\u6301\u9ad8\u6570\u636e\u901f\u7387\u548c\u4f4e\u529f\u8017\u9700\u8981\u7efc\u5408\u8003\u8651\u6ce2\u7279\u7387\u7684\u9009\u62e9\u3001\u4f4e\u529f\u8017\u6a21\u5f0f\u7684\u5e94\u7528\u3001\u4e2d\u65ad\u548cDMA\u7684\u6b63\u786e\u914d\u7f6e\u4ee5\u53ca\u786c\u4ef6\u8bbe\u8ba1\u7684\u4f18\u5316\u3002\u901a\u8fc7\u8fd9\u4e9b\u63aa\u65bd\uff0c\u53ef\u4ee5\u5728\u4fdd\u8bc1\u901a\u4fe1\u6548\u7387\u7684\u540c\u65f6\uff0c\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u80fd\u91cf\u6d88\u8017\u3002<\/p>\n\n\n\n

      \"UART\u901a\u4fe1\u534f\u8bae\"<\/figure>\n\n\n\n

      \u3000\u3000\u4e09\u3001 UART\u901a\u4fe1\u4e2d\u5e38\u89c1\u7684\u9519\u8bef\u7c7b\u578b\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\u662f\u4ec0\u4e48?<\/h2>\n\n\n\n

      \u3000\u3000UART\u901a\u4fe1\u4e2d\u5e38\u89c1\u7684\u9519\u8bef\u7c7b\u578b\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\u5305\u62ec\uff1a<\/p>\n\n\n\n

        \n
      • \u3000\u3000\u4e71\u7801\u95ee\u9898<\/strong>\uff1a\u4e32\u53e3\u901a\u8baf\u4e71\u7801\u6700\u4e3b\u8981\u7684\u539f\u56e0\u662f\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u566a\u58f0\u5e72\u6270\u6216\u8005\u6ce2\u7279\u7387\u8bbe\u7f6e\u4e0d\u6b63\u786e\u3002\u89e3\u51b3\u65b9\u6cd5\u5305\u62ec\u786e\u4fdd\u6570\u636e\u7ebf\u8fde\u63a5\u826f\u597d\uff0c\u51cf\u5c11\u7535\u78c1\u5e72\u6270\uff0c\u4ee5\u53ca\u8c03\u6574\u6ce2\u7279\u7387\u4ee5\u9002\u5e94\u5b9e\u9645\u7684\u901a\u4fe1\u73af\u5883\u3002<\/li>\n\n\n\n
      • \u3000\u3000\u4e0a\u6ea2\u9519\u8bef<\/strong>\uff1a\u5728\u63a5\u6536\u6570\u636e\u65f6\uff0c\u5982\u679cRXNE\u6807\u5fd7\u4f4d\u6ca1\u6709\u88ab\u590d\u4f4d\uff0c\u800c\u8fd9\u65f6\u53c8\u63a5\u6536\u5230\u4e00\u4e2a\u5b57\u7b26\u5c31\u4f1a\u53d1\u751f\u6ea2\u51fa\u9519\u8bef\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u4e2d\u65ad\u4e2d\u5224\u65ad\u8be5\u6807\u5fd7\u4f4d\uff0c\u5e76\u6e05\u7a7a\u8be5\u6807\u5fd7\u4f4d\u3002<\/li>\n\n\n\n
      • \u3000\u3000\u4e22\u5931\u6570\u636e\u95ee\u9898<\/strong>\uff1aUART\u53d1\u9001\u4e22\u5931\u6570\u636e\u901a\u5e38\u662f\u7531\u4e8e\u4f20\u8f93\u672a\u5b8c\u6210\u7684\u539f\u56e0\u3002\u89e3\u51b3\u529e\u6cd5\u5305\u62ec\u4f7f\u7528\u66f4\u9ad8\u7cbe\u5ea6\u7684\u6676\u632f\u6765\u63d0\u9ad8\u65f6\u949f\u7684\u7a33\u5b9a\u6027\uff0c\u964d\u4f4e\u901a\u4fe1\u6ce2\u7279\u7387\u4ee5\u51cf\u5c11\u6570\u636e\u4f20\u8f93\u901f\u7387\uff0c\u4ece\u800c\u51cf\u5c11\u4e22\u5931\u6570\u636e\u7684\u53ef\u80fd\u6027\u3002<\/li>\n\n\n\n
      • \u3000\u3000\u65e0\u6cd5\u53d1\u9001\u4f46\u53ef\u4ee5\u63a5\u6536\u7684\u95ee\u9898<\/strong>\uff1a\u9996\u5148\u9700\u8981\u786e\u4fddUART\u5f15\u811a\u6b63\u786e\u8fde\u63a5\u5e76\u4e14\u6ce2\u7279\u7387\u8bbe\u7f6e\u6b63\u786e\u3002\u7136\u540e\uff0c\u68c0\u67e5\u7f13\u51b2\u533a\u662f\u5426\u5df2\u6ee1\uff0c\u5982\u679c\u662f\uff0c\u5219\u9700\u8981\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\uff0c\u76f4\u5230\u7f13\u51b2\u533a\u7a7a\u95f2\u3002<\/li>\n\n\n\n
      • \u3000\u3000\u5171\u5730\u95ee\u9898<\/strong>\uff1a\u5f53\u9047\u5230\u4e32\u53e3\u901a\u8baf\u95ee\u9898\u65f6\uff0c\u5e94\u9996\u5148\u81ea\u68c0\u5de5\u5177\uff0c\u518d\u68c0\u67e5\u662f\u5426\u53cc\u65b9\u5171\u5730\u3002GND\u63d0\u4f9b\u4e86\u4e00\u4e2a\u57fa\u51c60\u7535\u5e73\uff0c\u5982\u679c\u6ca1\u6709\u5171\u5730\u7684\u8bdd\uff0c\u90a3\u6781\u6709\u53ef\u80fd\u4f1a\u51fa\u95ee\u9898\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u786e\u4fdd\u53cc\u65b9\u6709\u826f\u597d\u7684\u5171\u5730\u8fde\u63a5\u3002<\/li>\n<\/ul>\n\n\n\n

        \u3000\u3000UART\u901a\u4fe1\u4e2d\u7684\u5e38\u89c1\u9519\u8bef\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\u6db5\u76d6\u4e86\u4e71\u7801\u3001\u4e0a\u6ea2\u3001\u4e22\u5931\u6570\u636e\u3001\u65e0\u6cd5\u53d1\u9001\u4f46\u53ef\u4ee5\u63a5\u6536\u4ee5\u53ca\u5171\u5730\u95ee\u9898\u7b49\u65b9\u9762\u3002\u901a\u8fc7\u6b63\u786e\u8fde\u63a5\u5f15\u811a\u3001\u8c03\u6574\u6ce2\u7279\u7387\u3001\u786e\u4fdd\u5171\u5730\u8fde\u63a5\u7b49\u63aa\u65bd\uff0c\u53ef\u4ee5\u6709\u6548\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u3002<\/p>\n\n\n\n

        \u3000\u3000\u56db\u3001 \u5728UART\u901a\u4fe1\u4e2d\uff0c\u5982\u4f55\u5b9e\u73b0\u9519\u8bef\u68c0\u6d4b\u548c\u7ea0\u6b63\u673a\u5236?<\/h2>\n\n\n\n

        \u3000\u3000\u5728UART\u901a\u4fe1\u4e2d\uff0c\u5b9e\u73b0\u9519\u8bef\u68c0\u6d4b\u548c\u7ea0\u6b63\u673a\u5236\u4e3b\u8981\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\uff1a<\/p>\n\n\n\n

          \n
        • \u3000\u3000\u5947\u5076\u6821\u9a8c\u4f4d(Parity)<\/strong>\uff1a\u901a\u8fc7\u5728\u6570\u636e\u5e27\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u5947\u5076\u6821\u9a8c\u4f4d\u6765\u68c0\u6d4b\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u3002\u5982\u679c\u63a5\u6536\u5230\u7684\u6570\u636e\u5e27\u4e2d\u7684\u5947\u5076\u6821\u9a8c\u4f4d\u4e0e\u8ba1\u7b97\u51fa\u7684\u5947\u5076\u6821\u9a8c\u4f4d\u4e0d\u7b26\uff0c\u5219\u8868\u660e\u6570\u636e\u4f20\u8f93\u8fc7\u7a0b\u4e2d\u53d1\u751f\u4e86\u9519\u8bef\u3002<\/li>\n\n\n\n
        • \u3000\u3000\u5e27\u9519\u8bef(Frame Error)<\/strong>\uff1a\u5e27\u9519\u8bef\u662f\u901a\u8fc7\u68c0\u6d4b\u6570\u636e\u5e27\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u6807\u5fd7\u6765\u5b9e\u73b0\u7684\u3002\u5982\u679c\u5728\u89c4\u5b9a\u65f6\u95f4\u5185\u6ca1\u6709\u63a5\u6536\u5230\u671f\u671b\u7684\u5f00\u59cb\u6216\u7ed3\u675f\u6807\u5fd7\uff0c\u5219\u8ba4\u4e3a\u53d1\u751f\u4e86\u5e27\u9519\u8bef\u3002<\/li>\n\n\n\n
        • \u3000\u3000\u91cd\u53d1\u673a\u5236<\/strong>\uff1a\u5f53\u68c0\u6d4b\u5230\u6570\u636e\u4f20\u8f93\u9519\u8bef\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u91cd\u53d1\u6570\u636e\u5e27\u7684\u65b9\u5f0f\u6765\u5c1d\u8bd5\u7ea0\u6b63\u9519\u8bef\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u7b80\u5355\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u4f46\u53ef\u80fd\u9700\u8981\u989d\u5916\u7684\u8d44\u6e90\u6765\u652f\u6301\u91cd\u53d1\u64cd\u4f5c\u3002<\/li>\n\n\n\n
        • \u3000\u3000\u786e\u8ba4\u5e94\u7b54(Acknowledgment)<\/strong>\uff1a\u53d1\u9001\u65b9\u5728\u53d1\u9001\u5b8c\u4e00\u4e2a\u6570\u636e\u5e27\u540e\uff0c\u53ef\u4ee5\u7b49\u5f85\u63a5\u6536\u65b9\u7684\u786e\u8ba4\u5e94\u7b54\u3002\u5982\u679c\u5728\u4e00\u5b9a\u65f6\u95f4\u5185\u6ca1\u6709\u6536\u5230\u786e\u8ba4\u5e94\u7b54\uff0c\u5219\u53ef\u4ee5\u91cd\u53d1\u8be5\u6570\u636e\u5e27\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u63d0\u9ad8\u6570\u636e\u4f20\u8f93\u7684\u53ef\u9760\u6027\uff0c\u4f46\u4f1a\u589e\u52a0\u901a\u4fe1\u7684\u5ef6\u8fdf\u3002<\/li>\n\n\n\n
        • \u3000\u3000\u4f7f\u7528\u66f4\u5f3a\u5927\u7684\u9519\u8bef\u68c0\u6d4b\u548c\u7ea0\u6b63\u673a\u5236<\/strong>\uff1a\u5bf9\u4e8e\u590d\u6742\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u5982\u591a\u4f4d\u9519\u8bef\uff0c\u4ec5\u4f9d\u9760\u5947\u5076\u6821\u9a8c\u53ef\u80fd\u65e0\u6cd5\u6709\u6548\u68c0\u6d4b\u6216\u7ea0\u6b63\u9519\u8bef\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u7ed3\u5408\u4f7f\u7528\u5176\u4ed6\u66f4\u9ad8\u7ea7\u7684\u9519\u8bef\u68c0\u6d4b\u548c\u7ea0\u6b63\u6280\u672f\uff0c\u5982\u5faa\u73af\u5197\u4f59\u6821\u9a8c(Cyclic Redundancy Check, CRC)\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n

          \u3000\u3000UART\u901a\u4fe1\u4e2d\u7684\u9519\u8bef\u68c0\u6d4b\u548c\u7ea0\u6b63\u673a\u5236\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5305\u62ec\u4f46\u4e0d\u9650\u4e8e\u5947\u5076\u6821\u9a8c\u3001\u5e27\u9519\u8bef\u68c0\u6d4b\u3001\u91cd\u53d1\u673a\u5236\u3001\u786e\u8ba4\u5e94\u7b54\u4ee5\u53ca\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684\u9519\u8bef\u68c0\u6d4b\u548c\u7ea0\u6b63\u6280\u672f\u3002\u9009\u62e9\u54ea\u79cd\u673a\u5236\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u9700\u6c42\u548c\u7cfb\u7edf\u7684\u8d44\u6e90\u9650\u5236\u3002<\/p>\n\n\n\n

          \u3000\u3000\u4e94\u3001 \u9488\u5bf9UART\u901a\u4fe1\u7684\u6700\u65b0\u6280\u672f\u8fdb\u5c55\u6709\u54ea\u4e9b?<\/h2>\n\n\n\n

          \u3000\u3000\u9488\u5bf9UART\u901a\u4fe1\u7684\u6700\u65b0\u6280\u672f\u8fdb\u5c55\uff0c\u53ef\u4ee5\u603b\u7ed3\u51fa\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n\n\n\n

            \n
          • \u3000\u3000\u5f02\u6b65\u6027\u3001\u7b80\u5355\u6027\u548c\u7075\u6d3b\u6027<\/strong>\uff1aUART\u4e32\u53e3\u901a\u4fe1\u534f\u8bae\u4ee5\u5176\u5f02\u6b65\u6027\u3001\u7b80\u5355\u6027\u548c\u7075\u6d3b\u6027\u8457\u79f0\uff0c\u8fd9\u4e9b\u7279\u70b9\u4f7f\u5f97\u5b83\u80fd\u591f\u9002\u5e94\u4e0d\u540c\u7684\u901a\u4fe1\u9700\u6c42\u3002\u8fd9\u79cd\u7075\u6d3b\u6027\u548c\u9002\u5e94\u6027\u662fUART\u5728\u5d4c\u5165\u5f0f\u7cfb\u7edf\u3001\u4f20\u611f\u5668\u7f51\u7edc\u548c\u901a\u4fe1\u8c03\u8bd5\u7b49\u9886\u57df\u5e7f\u6cdb\u5e94\u7528\u7684\u57fa\u7840\u3002<\/li>\n\n\n\n
          • \u3000\u3000\u6700\u9ad8\u5de5\u4f5c\u9891\u7387\u7684\u91cd\u8981\u6027<\/strong>\uff1aUART\u7684\u6700\u9ad8\u5de5\u4f5c\u9891\u7387\u5bf9\u4e8e\u6570\u636e\u4f20\u8f93\u901f\u7387\u548c\u7cfb\u7edf\u6027\u80fd\u81f3\u5173\u91cd\u8981\u3002\u8fd9\u610f\u5473\u7740\u968f\u7740\u6280\u672f\u7684\u53d1\u5c55\uff0c\u63d0\u9ad8UART\u7684\u5de5\u4f5c\u9891\u7387\u6210\u4e3a\u4e86\u63d0\u5347\u6570\u636e\u4f20\u8f93\u6548\u7387\u548c\u7cfb\u7edf\u6027\u80fd\u7684\u5173\u952e\u65b9\u5411\u4e4b\u4e00\u3002<\/li>\n\n\n\n
          • \u3000\u3000\u96c6\u6210\u5316\u8d8b\u52bf<\/strong>\uff1a\u968f\u7740\u5fae\u63a7\u5236\u5668\u6280\u672f\u7684\u53d1\u5c55\uff0cUART\u7684\u529f\u80fd\u8d8a\u6765\u8d8a\u591a\u5730\u96c6\u6210\u5728\u5fae\u63a7\u5236\u5668\u4e2d\u3002\u4f8b\u5982\uff0cMicrochip Technology\u7684PIC16F688T-I\/SL\u5c31\u662f\u5c06UART\u529f\u80fd\u96c6\u6210\u5728\u5fae\u63a7\u5236\u5668\u4e2d\u7684\u4e00\u4e2a\u4f8b\u5b50\u3002\u8fd9\u79cd\u96c6\u6210\u5316\u4e0d\u4ec5\u51cf\u5c11\u4e86\u5916\u90e8\u7ec4\u4ef6\u7684\u9700\u6c42\uff0c\u4e5f\u63d0\u9ad8\u4e86\u7cfb\u7edf\u7684\u6574\u4f53\u6027\u80fd\u548c\u53ef\u9760\u6027\u3002<\/li>\n\n\n\n
          • \u3000\u3000\u53ef\u9760\u6027\u589e\u5f3a<\/strong>\uff1a\u4e3a\u4e86\u5e94\u5bf9\u590d\u6742\u7684\u901a\u4fe1\u73af\u5883\uff0c\u4e00\u4e9b\u4f9b\u5e94\u5546\u5c06UART\u79f0\u4e3a\u5f02\u6b65\u901a\u4fe1\u5143\u4ef6(ACE)\uff0c\u5e76\u63d0\u4f9b\u4e86\u57fa\u4e8e\u901a\u7528\u5f02\u6b65\u63a5\u6536\u5668\/\u53d1\u5c04\u5668\u7684\u53ef\u9760\u4e32\u884c\u63a5\u53e3\u89e3\u51b3\u65b9\u6848\u3002\u8fd9\u8868\u660e\u5728\u6700\u65b0\u7684\u6280\u672f\u8fdb\u5c55\u4e2d\uff0c\u589e\u5f3aUART\u7684\u53ef\u9760\u6027\u548c\u7a33\u5b9a\u6027\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u65b9\u5411\u3002<\/li>\n<\/ul>\n\n\n\n

            \u3000\u3000UART\u901a\u4fe1\u7684\u6700\u65b0\u6280\u672f\u8fdb\u5c55\u4e3b\u8981\u96c6\u4e2d\u5728\u63d0\u9ad8\u5176\u5de5\u4f5c\u9891\u7387\u4ee5\u63d0\u5347\u6570\u636e\u4f20\u8f93\u901f\u7387\u548c\u7cfb\u7edf\u6027\u80fd\uff0c\u4ee5\u53ca\u901a\u8fc7\u96c6\u6210\u5316\u8bbe\u8ba1\u51cf\u5c11\u5916\u90e8\u7ec4\u4ef6\u9700\u6c42\u5e76\u63d0\u9ad8\u7cfb\u7edf\u7684\u6574\u4f53\u6027\u80fd\u548c\u53ef\u9760\u6027\u3002\u540c\u65f6\uff0c\u589e\u5f3aUART\u7684\u53ef\u9760\u6027\u548c\u7a33\u5b9a\u6027\u4e5f\u662f\u5f53\u524d\u6280\u672f\u53d1\u5c55\u7684\u4e00\u4e2a\u91cd\u8981\u65b9\u5411\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

            UART\u662f\u4e00\u79cd\u57fa\u672c\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u4e32\u884c\u901a\u4fe1\u534f\u8bae\uff0c\u9002\u7528\u4e8e\u9700\u8981\u7b80\u5355\u3001\u9ad8\u6548\u4e14\u6210\u672c\u6548\u76ca\u9ad8\u7684\u53cc\u5411\u901a\u4fe1\u573a\u666f\u3002\u901a\u8fc7\u7406\u89e3\u5176\u5de5\u4f5c\u539f\u7406\u548c\u914d\u7f6e\u53c2\u6570\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u6709\u6548\u5730\u5229\u7528UART\u8fdb\u884c\u6570\u636e\u4f20\u8f93\u3002<\/p>\n","protected":false},"author":1,"featured_media":89391,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[145],"class_list":["post-89390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-uart"],"_links":{"self":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/posts\/89390"}],"collection":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/comments?post=89390"}],"version-history":[{"count":0,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/posts\/89390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/media\/89391"}],"wp:attachment":[{"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/media?parent=89390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/categories?post=89390"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.dealsbon.com\/wp-json\/wp\/v2\/tags?post=89390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}