{"id":2356,"date":"2021-04-09T17:17:11","date_gmt":"2021-04-09T09:17:11","guid":{"rendered":"https:\/\/www.lgscomputer.com\/?p=2356"},"modified":"2021-04-09T17:17:11","modified_gmt":"2021-04-09T09:17:11","slug":"%e5%b7%a5%e6%8e%a7%e6%9c%bagpio%e6%8e%a5%e5%8f%a3%e9%99%a4%e4%ba%86%e8%be%93%e5%85%a5%e8%be%93%e5%87%ba%e5%8a%9f%e8%83%bd%e8%bf%98%e8%83%bd%e8%bf%99%e6%a0%b7%e7%94%a8%e4%bd%a0%e7%9f%a5%e9%81%93","status":"publish","type":"post","link":"https:\/\/www.lgscomputer.com\/2356.html","title":{"rendered":"\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u9664\u4e86\u8f93\u5165\u8f93\u51fa\u529f\u80fd\u8fd8\u80fd\u8fd9\u6837\u7528\u4f60\u77e5\u9053\u5417\uff1f"},"content":{"rendered":"

\u5de5\u63a7\u673aGPIO\u53e3\u9664\u4e86\u8f93\u5165\u8f93\u51fa\u529f\u80fd\u8fd8\u80fd\u8fd9\u6837\u7528\u4f60\u77e5\u9053\u5417\uff1f<\/p>\n

GPIO\u5b8c\u6574\u5199\u6cd5\u662fGeneralPurposeInputOutput\uff0c\u7ffb\u8bd1\u8fc7\u6765\u7684\u5b57\u9762\u610f\u601d\u5c31\u662f\u901a\u7528\u8f93\u5165\u8f93\u51fa\u3002\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u901a\u5e38\u6211\u4eec\u4e60\u60ef\u79f0\u4e3a\u201cI\/O\u53e3\u201d\u6216\u603b\u7ebf\u6269\u5c55\u5668\uff0c\u5c31\u662f\u5229\u7528\u5de5\u4e1a\u6807\u51c6I2C\u3001SMBus\u6216SPI\u63a5\u53e3\u7b80\u5316\u4e86I\/O\u53e3\u7684\u6269\u5c55\u3002\u5f53\u5fae\u63a7\u5236\u5668\u6216\u82af\u7247\u7ec4\u6ca1\u6709\u8db3\u591f\u7684I\/O\u7aef\u53e3\uff0c\u6216\u5f53\u7cfb\u7edf\u9700\u8981\u91c7\u7528\u8fdc\u7aef\u4e32\u884c\u901a\u4fe1\u6216\u63a7\u5236\u65f6\uff0cGPIO\u4ea7\u54c1\u80fd\u591f\u63d0\u4f9b\u989d\u5916\u7684\u63a7\u5236\u548c\u76d1\u89c6\u529f\u80fd\u3002<\/p>\n

GPIO\u63a5\u53e3\u9664\u4e86\u65e2\u53ef\u4ee5\u5728\u5de5\u63a7\u673a\u6570\u636e\u4f20\u8f93\u4e2d\u5f53\u8f93\u5165\u53e3\u548c\u8f93\u51fa\u53e3\u4f7f\u7528\uff0c\u8fd8\u80fd\u5728\u4e0b\u9762\u8fd9\u4e9b\u573a\u666f\u91cc\u9762\u8d77\u5230\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\uff0c\u4e00\u8d77\u6765\u770b\u770b\u5427\u3002<\/p>\n

\u4e00\u3001GPIO\u505a\u5f00\u5173\u63a7\u5236<\/p>\n

\u4e00\u822c\u7528\u6765\u505aLED\u706f\u5f00\u5173\u63a7\u5236\u3002\u901a\u8fc7\u8f6f\u4ef6\u4ee3\u7801\uff0c\u5728\u9700\u8981\u4eae\u706f\u7684\u65f6\u5019\u8c03\u7528GPIO\u53e3\u62c9\u9ad8\u7684\u51fd\u6570\uff0c\u9700\u8981\u7184\u706f\u7684\u65f6\u5019\u8c03\u7528GPIO\u62c9\u4f4e\u7684\u51fd\u6570\uff0c\u5373\u53ef\u5b9e\u73b0\u63a7\u5236\u3002<\/p>\n

\"IMG_256\"<\/p>\n

\u4e8c\u3001GPIO\u505a\u8f93\u5165\u4e2d\u65ad\u4fe1\u53f7<\/p>\n

\u7528GPIO\u505a\u4e2d\u65ad\u4fe1\u53f7\u8f93\u5165\u9700\u8981\u7279\u522b\u6ce8\u610f\u4e00\u70b9\uff1a\u5982\u679c\u9009\u62e9\u8fd9\u4e2a\u4e2d\u65ad\u53e3\u6765\u5524\u9192\u7cfb\u7edf\uff0c\u90a3\u4e00\u5b9a\u8981\u5bf9\u7167\u82af\u7247\u89c4\u683c\u4e66\u770b\u6e05\u695a\uff0c\u9009\u62e9\u7684\u4e2d\u65ad\u53e3\u80fd\u4e0d\u80fd\u5524\u9192\u7cfb\u7edf\uff1f<\/p>\n

\u5bf9\u4e8e\u5927\u90e8\u5206\u5355\u7247\u673a\uff0c\u51e0\u4e4e\u6bcf\u4e00\u4e2a\u4e2d\u65ad\u53e3\u90fd\u53ef\u4ee5\u5524\u9192\u7cfb\u7edf\uff0c\u4f46\u5bf9\u4e8e\u9ad8\u4e3b\u9891\u7684\u5904\u7406\u5668\uff0c\u5982\u5e73\u677f\u7535\u8111\uff0c\u5e76\u4e0d\u662f\u6240\u6709\u7684GPIO\u90fd\u53ef\u4ee5\u914d\u7f6e\u6210\u4e2d\u65ad\uff0c\u4e5f\u4e0d\u662f\u6240\u6709\u7684\u4e2d\u65ad\u90fd\u80fd\u5524\u9192\u7cfb\u7edf\u3002<\/p>\n

\u4e09\u3001GPIO\u505a\u6309\u952e\u68c0\u6d4b<\/p>\n

\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u9ed8\u8ba4\u72b6\u6001\u662f\u4f4e\u7535\u5e73\uff0c\u6309\u952e\u6309\u4e0b\u540e\u88ab\u62c9\u5230\u9ad8\u7535\u5e73\uff0c\u6b64\u65f6\u7cfb\u7edf\u80fd\u591f\u68c0\u6d4b\u5230\u4e2d\u65ad\uff0c\u5224\u5b9a\u4e3a\u6309\u952e\u6309\u4e0b\u3002\u7b49\u5230\u6309\u952e\u91ca\u653e\u4e86\uff0cGPIO\u63a5\u53e3\u68c0\u6d4b\u5230\u7535\u538b\u56de\u5f52\u4f4e\u7535\u5e73\uff0c\u5c31\u5224\u5b9a\u4e3a\u6309\u952e\u677e\u5f00\u4e86\u3002\u8fd9\u79cd\u505a\u6cd5\u5728\u5355\u7247\u673a\u4e0a\u6bd4\u8f83\u5e38\u89c1\u7684\u505a\u6cd5\u3002<\/p>\n

\u5f53\u7136\uff0c\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u9664\u4e86\u7b80\u5355\u7684\u8f93\u5165\u8f93\u51fa\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u505a\u4e00\u4e9b\u76f8\u5bf9\u590d\u6742\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u6a21\u62dfI2C\u603b\u7ebf\u6216SPI\u6570\u636e\u7ebf\u3001\u8f93\u51faPWM\u6ce2\u5f62\u3001ADC\u7535\u538b\u68c0\u6d4b\u7b49\u3002\u8fd9\u4e9b\u529f\u80fd\u6709\u4e9b\u53ef\u4ee5\u76f4\u63a5\u914d\u7f6e\u6210\u786c\u4ef6\u63a5\u53e3\uff0c\u6709\u4e9b\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8f6f\u4ef6\u6765\u6a21\u62df\u6ce2\u5f62\uff0c\u8fd9\u91cc\u5c31\u4e0d\u4e00\u4e00\u7ed9\u5927\u5bb6\u8fdb\u884c\u4ecb\u7ecd\u4e86\u3002<\/p>\n

\u5de5\u63a7\u673aGPIO\u53e3\u9664\u4e86\u8f93\u5165\u8f93\u51fa\u529f\u80fd\u8fd8\u80fd\u8fd9\u6837\u7528\u4f60\u77e5\u9053\u5417\uff1f<\/p>\n

GPIO\u5b8c\u6574\u5199\u6cd5\u662fGeneralPurposeInputOutput\uff0c\u7ffb\u8bd1\u8fc7\u6765\u7684\u5b57\u9762\u610f\u601d\u5c31\u662f\u901a\u7528\u8f93\u5165\u8f93\u51fa\u3002\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u901a\u5e38\u6211\u4eec\u4e60\u60ef\u79f0\u4e3a\u201cI\/O\u53e3\u201d\u6216\u603b\u7ebf\u6269\u5c55\u5668\uff0c\u5c31\u662f\u5229\u7528\u5de5\u4e1a\u6807\u51c6I2C\u3001SMBus\u6216SPI\u63a5\u53e3\u7b80\u5316\u4e86I\/O\u53e3\u7684\u6269\u5c55\u3002\u5f53\u5fae\u63a7\u5236\u5668\u6216\u82af\u7247\u7ec4\u6ca1\u6709\u8db3\u591f\u7684I\/O\u7aef\u53e3\uff0c\u6216\u5f53\u7cfb\u7edf\u9700\u8981\u91c7\u7528\u8fdc\u7aef\u4e32\u884c\u901a\u4fe1\u6216\u63a7\u5236\u65f6\uff0cGPIO\u4ea7\u54c1\u80fd\u591f\u63d0\u4f9b\u989d\u5916\u7684\u63a7\u5236\u548c\u76d1\u89c6\u529f\u80fd\u3002<\/p>\n

GPIO\u63a5\u53e3\u9664\u4e86\u65e2\u53ef\u4ee5\u5728\u5de5\u63a7\u673a\u6570\u636e\u4f20\u8f93\u4e2d\u5f53\u8f93\u5165\u53e3\u548c\u8f93\u51fa\u53e3\u4f7f\u7528\uff0c\u8fd8\u80fd\u5728\u4e0b\u9762\u8fd9\u4e9b\u573a\u666f\u91cc\u9762\u8d77\u5230\u81f3\u5173\u91cd\u8981\u7684\u4f5c\u7528\uff0c\u4e00\u8d77\u6765\u770b\u770b\u5427\u3002<\/p>\n

\u4e00\u3001GPIO\u505a\u5f00\u5173\u63a7\u5236<\/p>\n

\u4e00\u822c\u7528\u6765\u505aLED\u706f\u5f00\u5173\u63a7\u5236\u3002\u901a\u8fc7\u8f6f\u4ef6\u4ee3\u7801\uff0c\u5728\u9700\u8981\u4eae\u706f\u7684\u65f6\u5019\u8c03\u7528GPIO\u53e3\u62c9\u9ad8\u7684\u51fd\u6570\uff0c\u9700\u8981\u7184\u706f\u7684\u65f6\u5019\u8c03\u7528GPIO\u62c9\u4f4e\u7684\u51fd\u6570\uff0c\u5373\u53ef\u5b9e\u73b0\u63a7\u5236\u3002<\/p>\n

\"IMG_256\"<\/p>\n

\u4e8c\u3001GPIO\u505a\u8f93\u5165\u4e2d\u65ad\u4fe1\u53f7<\/p>\n

\u7528GPIO\u505a\u4e2d\u65ad\u4fe1\u53f7\u8f93\u5165\u9700\u8981\u7279\u522b\u6ce8\u610f\u4e00\u70b9\uff1a\u5982\u679c\u9009\u62e9\u8fd9\u4e2a\u4e2d\u65ad\u53e3\u6765\u5524\u9192\u7cfb\u7edf\uff0c\u90a3\u4e00\u5b9a\u8981\u5bf9\u7167\u82af\u7247\u89c4\u683c\u4e66\u770b\u6e05\u695a\uff0c\u9009\u62e9\u7684\u4e2d\u65ad\u53e3\u80fd\u4e0d\u80fd\u5524\u9192\u7cfb\u7edf\uff1f<\/p>\n

\u5bf9\u4e8e\u5927\u90e8\u5206\u5355\u7247\u673a\uff0c\u51e0\u4e4e\u6bcf\u4e00\u4e2a\u4e2d\u65ad\u53e3\u90fd\u53ef\u4ee5\u5524\u9192\u7cfb\u7edf\uff0c\u4f46\u5bf9\u4e8e\u9ad8\u4e3b\u9891\u7684\u5904\u7406\u5668\uff0c\u5982\u5e73\u677f\u7535\u8111\uff0c\u5e76\u4e0d\u662f\u6240\u6709\u7684GPIO\u90fd\u53ef\u4ee5\u914d\u7f6e\u6210\u4e2d\u65ad\uff0c\u4e5f\u4e0d\u662f\u6240\u6709\u7684\u4e2d\u65ad\u90fd\u80fd\u5524\u9192\u7cfb\u7edf\u3002<\/p>\n

\u4e09\u3001GPIO\u505a\u6309\u952e\u68c0\u6d4b<\/p>\n

\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u9ed8\u8ba4\u72b6\u6001\u662f\u4f4e\u7535\u5e73\uff0c\u6309\u952e\u6309\u4e0b\u540e\u88ab\u62c9\u5230\u9ad8\u7535\u5e73\uff0c\u6b64\u65f6\u7cfb\u7edf\u80fd\u591f\u68c0\u6d4b\u5230\u4e2d\u65ad\uff0c\u5224\u5b9a\u4e3a\u6309\u952e\u6309\u4e0b\u3002\u7b49\u5230\u6309\u952e\u91ca\u653e\u4e86\uff0cGPIO\u63a5\u53e3\u68c0\u6d4b\u5230\u7535\u538b\u56de\u5f52\u4f4e\u7535\u5e73\uff0c\u5c31\u5224\u5b9a\u4e3a\u6309\u952e\u677e\u5f00\u4e86\u3002\u8fd9\u79cd\u505a\u6cd5\u5728\u5355\u7247\u673a\u4e0a\u6bd4\u8f83\u5e38\u89c1\u7684\u505a\u6cd5\u3002<\/p>\n

\u5f53\u7136\uff0c\u5de5\u63a7\u673aGPIO\u63a5\u53e3\u9664\u4e86\u7b80\u5355\u7684\u8f93\u5165\u8f93\u51fa\u4e4b\u5916\uff0c\u8fd8\u53ef\u4ee5\u505a\u4e00\u4e9b\u76f8\u5bf9\u590d\u6742\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u6a21\u62dfI2C\u603b\u7ebf\u6216SPI\u6570\u636e\u7ebf\u3001\u8f93\u51faPWM\u6ce2\u5f62\u3001ADC\u7535\u538b\u68c0\u6d4b\u7b49\u3002\u8fd9\u4e9b\u529f\u80fd\u6709\u4e9b\u53ef\u4ee5\u76f4\u63a5\u914d\u7f6e\u6210\u786c\u4ef6\u63a5\u53e3\uff0c\u6709\u4e9b\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8f6f\u4ef6\u6765\u6a21\u62df\u6ce2\u5f62\uff0c\u8fd9\u91cc\u5c31\u4e0d\u4e00\u4e00\u7ed9\u5927\u5bb6\u8fdb\u884c\u4ecb\u7ecd\u4e86\u3002<\/p>\n

 <\/p>\n","protected":false},"excerpt":{"rendered":"

\u5de5\u63a7\u673aGPIO\u53e3\u9664\u4e86\u8f93\u5165\u8f93\u51fa\u529f\u80fd\u8fd8\u80fd\u8fd9\u6837\u7528\u4f60\u77e5\u9053\u5417\uff1f GPIO\u5b8c\u6574\u5199\u6cd5\u662fGeneralPurposeInput […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[32],"class_list":["post-2356","post","type-post","status-publish","format-standard","hentry","category-xinwenzhongxin","tag-32"],"_links":{"self":[{"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/posts\/2356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/comments?post=2356"}],"version-history":[{"count":0,"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/posts\/2356\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/media?parent=2356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/categories?post=2356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lgscomputer.com\/wp-json\/wp\/v2\/tags?post=2356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}