{"id":45569,"date":"2023-09-29T21:23:30","date_gmt":"2023-09-29T13:23:30","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=45569"},"modified":"2023-09-29T21:23:30","modified_gmt":"2023-09-29T13:23:30","slug":"sszcksx","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/45569.html","title":{"rendered":"Serial\u8bbe\u7f6e\u4e32\u53e3\u5c5e\u6027"},"content":{"rendered":"
\u4e32\u53e3\uff08Serial\uff09\u662f\u4e00\u79cd\u6807\u51c6\u7684\u63a5\u53e3\uff0c\u5b83\u4f7f\u4e24\u53f0\u8ba1\u7b97\u673a\u6216\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002Serial\u8bbe\u7f6e\u4e32\u53e3\u5c5e\u6027\u662f\u4e00\u79cd\u6539\u53d8\u4e32\u53e3\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u6539\u53d8\u4e32\u53e3\u7684\u6ce2\u7279\u7387\uff0c\u6570\u636e\u4f4d\uff0c\u505c\u6b62\u4f4d\uff0c\u6821\u9a8c\u4f4d\u7b49\u3002<\/strong><\/p>\n \u6ce2\u7279\u7387\uff08Baud Rate\uff09\u662f\u6307\u4e32\u53e3\u6bcf\u79d2\u53ef\u4ee5\u4f20\u8f93\u7684\u6570\u636e\u4f4d\u6570\u3002\u5b83\u51b3\u5b9a\u4e86\u4e32\u53e3\u4f20\u8f93\u6570\u636e\u7684\u901f\u5ea6\uff0c\u4e5f\u662f\u4f20\u8f93\u6570\u636e\u7684\u57fa\u672c\u53c2\u6570\u3002\u6ce2\u7279\u7387\u7684\u5355\u4f4d\u662f\u6bd4\u7279\/\u79d2\uff08Bits\/s\uff09\uff0c\u5e38\u7528\u7684\u6ce2\u7279\u7387\u67091200\uff0c2400\uff0c4800\uff0c9600\uff0c19200\uff0c38400\uff0c57600\uff0c115200\u7b49\u3002<\/p>\n \u8981\u8bbe\u7f6e\u4e32\u53e3\u7684\u6ce2\u7279\u7387\uff0c\u9700\u8981\u4f7f\u7528Serial.begin()\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u8868\u793a\u6ce2\u7279\u7387\uff0c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8868\u793a\u4e32\u53e3\u7684\u6570\u636e\u4f4d\u6570\uff0c\u505c\u6b62\u4f4d\uff0c\u6821\u9a8c\u4f4d\u7b49\u3002\u4f8b\u5982\uff0c\u8981\u8bbe\u7f6e\u4e32\u53e3\u7684\u6ce2\u7279\u7387\u4e3a9600\uff0c\u53ef\u4ee5\u4f7f\u7528Serial.begin(9600)\u6765\u5b9e\u73b0\u3002<\/p>\n \u6570\u636e\u4f4d\uff08Data Bits\uff09\u662f\u6307\u4e32\u53e3\u4f20\u8f93\u7684\u6bcf\u4e2a\u5b57\u8282\u7684\u4f4d\u6570\uff0c\u5b83\u53ef\u4ee5\u662f5\u4f4d\u30016\u4f4d\u30017\u4f4d\u62168\u4f4d\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u4e32\u53e3\u7684\u6570\u636e\u4f4d\u90fd\u662f8\u4f4d\uff0c\u4f46\u4e5f\u53ef\u4ee5\u4f7f\u7528Serial.begin()\u51fd\u6570\u6765\u8bbe\u7f6e\u6570\u636e\u4f4d\uff0c\u53ea\u9700\u8981\u5c06\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3a8\u5373\u53ef\u3002<\/p>\n \u505c\u6b62\u4f4d\uff08Stop Bits\uff09\u662f\u6307\u4e32\u53e3\u4f20\u8f93\u7684\u6bcf\u4e2a\u5b57\u8282\u7684\u672b\u5c3e\u52a0\u4e0a\u7684\u4e00\u4f4d\uff0c\u7528\u4e8e\u8868\u793a\u4e00\u4e2a\u5b57\u8282\u7684\u4f20\u8f93\u7ed3\u675f\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u4e32\u53e3\u7684\u505c\u6b62\u4f4d\u90fd\u662f1\u4f4d\uff0c\u4f46\u4e5f\u53ef\u4ee5\u4f7f\u7528Serial.begin()\u51fd\u6570\u6765\u8bbe\u7f6e\u505c\u6b62\u4f4d\uff0c\u53ea\u9700\u8981\u5c06\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3a1\u5373\u53ef\u3002<\/p>\n \u6821\u9a8c\u4f4d\uff08Parity Bits\uff09\u662f\u6307\u4e32\u53e3\u4f20\u8f93\u7684\u6bcf\u4e2a\u5b57\u8282\u7684\u6821\u9a8c\u4f4d\uff0c\u5b83\u53ef\u4ee5\u662f\u5076\u6821\u9a8c\uff08Even\uff09\u3001\u5947\u6821\u9a8c\uff08Odd\uff09\u6216\u65e0\u6821\u9a8c\uff08None\uff09\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u4e32\u53e3\u7684\u6821\u9a8c\u4f4d\u90fd\u662f\u65e0\u6821\u9a8c\uff0c\u4f46\u4e5f\u53ef\u4ee5\u4f7f\u7528Serial.begin()\u51fd\u6570\u6765\u8bbe\u7f6e\u6821\u9a8c\u4f4d\uff0c\u53ea\u9700\u8981\u5c06\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3a0\u5373\u53ef\u3002<\/p>\n Serial\u8bbe\u7f6e\u4e32\u53e3\u5c5e\u6027\u662f\u4e00\u79cd\u6539\u53d8\u4e32\u53e3\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u6539\u53d8\u4e32\u53e3\u7684\u6ce2\u7279\u7387\uff0c\u6570\u636e\u4f4d\uff0c\u505c\u6b62\u4f4d\uff0c\u6821\u9a8c\u4f4d\u7b49\u3002<\/strong>\u8981\u8bbe\u7f6e\u4e32\u53e3\u7684\u8fd9\u4e9b\u5c5e\u6027\uff0c\u9700\u8981\u4f7f\u7528Serial.begin()\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u63a5\u53d7\u4e24\u4e2a\u53c2\u6570\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u8868\u793a\u6ce2\u7279\u7387\uff0c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u8868\u793a\u4e32\u53e3\u7684\u6570\u636e\u4f4d\u6570\uff0c\u505c\u6b62\u4f4d\uff0c\u6821\u9a8c\u4f4d\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u4e32\u53e3\uff08Serial\uff09\u662f\u4e00\u79cd\u6807\u51c6\u7684\u63a5\u53e3\uff0c\u5b83\u4f7f\u4e24\u53f0\u8ba1\u7b97\u673a\u6216\u8bbe\u5907\u4e4b\u95f4\u7684\u6570\u636e\u4f20\u8f93\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002Serial\u8bbe\u7f6e\u4e32\u53e3\u5c5e\u6027\u662f\u4e00\u79cd\u6539\u53d8\u4e32\u53e3\u7684\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u6539\u53d8\u4e32\u53e3\u7684\u6ce2\u7279\u7387<\/p>\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":[69],"class_list":["post-45569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-cktx"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45569","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=45569"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/45569\/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=45569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=45569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=45569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}Serial\u8bbe\u7f6e\u4e32\u53e3\u7684\u6ce2\u7279\u7387<\/h2>\n
Serial\u8bbe\u7f6e\u4e32\u53e3\u7684\u6570\u636e\u4f4d<\/h2>\n
Serial\u8bbe\u7f6e\u4e32\u53e3\u7684\u505c\u6b62\u4f4d<\/h2>\n
Serial\u8bbe\u7f6e\u4e32\u53e3\u7684\u6821\u9a8c\u4f4d<\/h2>\n
\u603b\u7ed3<\/h2>\n