{"id":57816,"date":"2023-10-22T10:41:25","date_gmt":"2023-10-22T02:41:25","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=57816"},"modified":"2023-10-22T10:41:25","modified_gmt":"2023-10-22T02:41:25","slug":"ubtlzmsz","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/57816.html","title":{"rendered":"UART\u6ce2\u7279\u7387\u600e\u4e48\u8bbe\u7f6e"},"content":{"rendered":"

  UART\uff08Universal Asynchronous Receiver \/ Transmitter\uff09\u662f\u4e00\u79cd\u57fa\u4e8e\u5f02\u6b65\u901a\u4fe1\u7684\u901a\u4fe1\u6280\u672f\uff0c\u53ef\u4ee5\u5728\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u3002UART\u6ce2\u7279\u7387\u662f\u6307UART\u6bcf\u79d2\u4f20\u8f93\u7684\u6570\u636e\u4f4d\u6570\uff0c\u5b83\u662fUART\u901a\u4fe1\u7684\u57fa\u7840\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u5e94\u7528\u573a\u666f\u9009\u62e9\u4e0d\u540c\u7684\u6ce2\u7279\u7387\u3002<\/strong>\u672c\u6587\u5c06\u4ecb\u7ecdUART\u6ce2\u7279\u7387\u7684\u8bbe\u7f6e\u65b9\u6cd5\uff0c\u4ee5\u53ca\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u6ce2\u7279\u7387\u3002<\/p>\n

UART\u6ce2\u7279\u7387\u7684\u8bbe\u7f6e<\/h2>\n

  UART\u6ce2\u7279\u7387\u7684\u8bbe\u7f6e\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u4e24\u7aef\u8bbe\u5907\u4e0a\u8bbe\u7f6e\u540c\u6837\u7684\u6ce2\u7279\u7387\u5373\u53ef\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u4f20\u8f93\u8ddd\u79bb\u8f83\u8fd1\u7684\u8bbe\u5907\u53ef\u4ee5\u4f7f\u7528\u8f83\u9ad8\u7684\u6ce2\u7279\u7387\uff0c\u800c\u4f20\u8f93\u8ddd\u79bb\u8f83\u8fdc\u7684\u8bbe\u5907\u5219\u9700\u8981\u4f7f\u7528\u8f83\u4f4e\u7684\u6ce2\u7279\u7387\u3002<\/p>\n

  \u4f7f\u7528\u4e32\u53e3\u8c03\u8bd5\u52a9\u624b\u8bbe\u7f6e\u6ce2\u7279\u7387<\/h3>\n

  \u4e32\u53e3\u8c03\u8bd5\u52a9\u624b\u662f\u4e00\u6b3e\u5e38\u7528\u7684\u4e32\u53e3\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u8bbe\u7f6eUART\u6ce2\u7279\u7387\u3002\u6253\u5f00\u8c03\u8bd5\u52a9\u624b\uff0c\u70b9\u51fb\u201c\u8bbe\u7f6e\u201d\uff0c\u5728\u201c\u901a\u4fe1\u53c2\u6570\u201d\u6807\u7b7e\u9875\u4e2d\u53ef\u4ee5\u770b\u5230\u201c\u6ce2\u7279\u7387\u201d\u9009\u9879\uff0c\u53ef\u4ee5\u9009\u62e9\u5e38\u7528\u7684\u6ce2\u7279\u7387\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u6ce2\u7279\u7387\u3002<\/p>\n

  \u4f7f\u7528\u786c\u4ef6\u8bbe\u7f6e\u6ce2\u7279\u7387<\/h3>\n

  \u6709\u4e9bUART\u8bbe\u5907\u53ef\u4ee5\u4f7f\u7528\u786c\u4ef6\u8bbe\u7f6e\u6ce2\u7279\u7387\uff0c\u4f8b\u5982STM32\u7cfb\u5217\u7684UART\u8bbe\u5907\uff0c\u53ef\u4ee5\u4f7f\u7528USART_Init()\u51fd\u6570\u6765\u8bbe\u7f6e\u6ce2\u7279\u7387\uff0c\u53ea\u9700\u8981\u5728\u51fd\u6570\u53c2\u6570\u4e2d\u6307\u5b9a\u6ce2\u7279\u7387\u5373\u53ef\u3002<\/p>\n

\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u6ce2\u7279\u7387<\/h2>\n

  \u9009\u62e9\u5408\u9002\u7684\u6ce2\u7279\u7387\u9700\u8981\u8003\u8651\u4f20\u8f93\u8ddd\u79bb\u3001\u4f20\u8f93\u901f\u7387\u4ee5\u53ca\u786c\u4ef6\u8bbe\u5907\u7684\u6027\u80fd\u7b49\u56e0\u7d20\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u4f20\u8f93\u8ddd\u79bb\u8d8a\u8fd1\uff0c\u53ef\u4ee5\u4f7f\u7528\u8d8a\u9ad8\u7684\u6ce2\u7279\u7387\uff1b\u800c\u4f20\u8f93\u8ddd\u79bb\u8d8a\u8fdc\uff0c\u5219\u9700\u8981\u4f7f\u7528\u8f83\u4f4e\u7684\u6ce2\u7279\u7387\uff0c\u4ee5\u4fdd\u8bc1\u6570\u636e\u7684\u51c6\u786e\u6027\u3002\u53e6\u5916\uff0c\u4e5f\u9700\u8981\u8003\u8651\u786c\u4ef6\u8bbe\u5907\u7684\u6027\u80fd\uff0c\u4f8b\u5982STM32\u7cfb\u5217\u7684UART\u8bbe\u5907\u53ef\u4ee5\u652f\u6301\u6700\u9ad8\u6ce2\u7279\u7387\u4e3a3M\uff0c\u56e0\u6b64\u4e5f\u4e0d\u80fd\u4f7f\u7528\u8d85\u8fc73M\u7684\u6ce2\u7279\u7387\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  UART\u6ce2\u7279\u7387\u662f\u6307UART\u6bcf\u79d2\u4f20\u8f93\u7684\u6570\u636e\u4f4d\u6570\uff0c\u5b83\u662fUART\u901a\u4fe1\u7684\u57fa\u7840\uff0c\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u5e94\u7528\u573a\u666f\u9009\u62e9\u4e0d\u540c\u7684\u6ce2\u7279\u7387\u3002<\/strong>UART\u6ce2\u7279\u7387\u7684\u8bbe\u7f6e\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5728\u4e24\u7aef\u8bbe\u5907\u4e0a\u8bbe\u7f6e\u540c\u6837\u7684\u6ce2\u7279\u7387\u5373\u53ef\u3002\u9009\u62e9\u5408\u9002\u7684\u6ce2\u7279\u7387\u9700\u8981\u8003\u8651\u4f20\u8f93\u8ddd\u79bb\u3001\u4f20\u8f93\u901f\u7387\u4ee5\u53ca\u786c\u4ef6\u8bbe\u5907\u7684\u6027\u80fd\u7b49\u56e0\u7d20\uff0c\u4ee5\u4fdd\u8bc1\u6570\u636e\u7684\u51c6\u786e\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

UART\uff08UniversalAsynchronousReceiver\/Transmitter\uff09\u662f\u4e00\u79cd\u57fa\u4e8e\u5f02\u6b65\u901a\u4fe1\u7684\u901a\u4fe1\u6280\u672f\uff0c\u53ef\u4ee5\u5728\u4e24\u4e2a\u8bbe\u5907\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u3002\n","protected":false},"author":1,"featured_media":4132,"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":[175],"class_list":["post-57816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-btl"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/57816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=57816"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/57816\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=57816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=57816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=57816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}