{"id":10696,"date":"2022-11-11T17:40:33","date_gmt":"2022-11-11T09:40:33","guid":{"rendered":"http:\/\/www.szryc.com\/?p=10696"},"modified":"2022-11-11T17:40:33","modified_gmt":"2022-11-11T09:40:33","slug":"%e5%b0%86%e6%ad%a5%e8%bf%9b%e7%94%b5%e6%9c%ba%e4%b8%8epic%e5%be%ae%e6%8e%a7%e5%88%b6%e5%99%a8%e8%bf%9e%e6%8e%a5%e7%9a%84%e6%96%b9%e5%bc%8f","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=10696","title":{"rendered":"\u5c06\u6b65\u8fdb\u7535\u673a\u4e0ePIC\u5fae\u63a7\u5236\u5668\u8fde\u63a5\u7684\u65b9\u5f0f"},"content":{"rendered":"

\u5728\u672c\u6559\u7a0b<\/u>\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u00a0MSP430<\/u>\u00a0\u8fde\u63a5\u6b65\u8fdb\u7535\u673a<\/u>\u3002MSP-EXP430G2 \u662f\u5fb7\u5dde\u4eea\u5668\u63d0\u4f9b\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u53c8\u540d LaunchPad\uff0c\u7528\u4e8e\u5b66\u4e60\u548c\u7ec3\u4e60\u5982\u4f55\u4f7f\u7528\u5176\u5fae\u63a7\u5236\u5668\u3002\u8be5\u677f\u5c5e\u4e8e MSP430 \u8d85\u503c\u7cfb\u5217\u7c7b\u522b\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u5176\u4e2d\u5bf9\u6240\u6709 MSP430 \u7cfb\u5217\u5fae\u63a7\u5236\u5668\u8fdb\u884c\u7f16\u7a0b<\/u>\u3002<\/p>\n

\u6b65\u8fdb\u7535\u673a\uff1a<\/p>\n

\u6b65\u8fdb\u7535\u673a<\/u>\u662f\u4e00\u79cd\u65e0\u5237\u76f4\u6d41\u7535\u673a\uff0c\u53ef\u5c06\u7535\u8109\u51b2\u8f6c\u6362\u4e3a\u4e0d\u540c\u7684\u673a\u68b0\u8fd0\u52a8\u3002\u6b65\u8fdb\u7535\u673a\u7684\u8f74\u4ee5\u79bb\u6563\u7684\u6b65\u8fdb\u65cb\u8f6c\u3002\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u9700\u8981\u83b7\u5f97\u7cbe\u786e\u7684\u6b65\u9aa4\u548c\u901f\u5ea6\u3002<\/p>\n

\"pYYBAGNuEb-AJSeEAAApPx_TyNM596\"<\/p>\n

\u6211\u4eec\u5c06\u4f7f\u7528\u5e02\u573a\u4e0a\u4fbf\u5b9c\u768435BYJ46\u53cc\u6781\u6b65\u8fdb\u7535\u673a\u3002\u5b83\u6709 6\u6839\u7535\u7ebf\uff0c\u4f46\u4e5f\u5e26\u6709 5 \u6839\u7535\u7ebf\u3002\u6211\u4eec\u7684\u6b65\u8fdb\u7535\u673a\u4e2d\u67092\u4e2a\u7ebf\u5708\u3002\u6bcf\u4e2a\u90fd\u6709 3 \u6839\u7535\u7ebf\u4ece\u4e2d\u51fa\u6765\u3002\u5728 3 \u6839\u7535\u7ebf\u4e2d\uff0c1 \u6839\u662f\u4e2d\u5fc3\u62bd\u5934\uff0c\u56e0\u6b64\uff0c\u5176\u4f59 2 \u6839\u7535\u7ebf\u76f4\u63a5\u4e0e\u7ebf\u5708\u8fde\u63a5\u3002\u6211\u4eec\u603b\u5171\u6709 4 \u6839\u4fe1\u53f7\u7ebf\u548c 2 \u6839\u4e2d\u5fc3\u62bd\u5934\u7ebf\uff0c\u5b83\u4eec\u4e0e 5-12V\u00a0\u7535\u6e90<\/u>\u8fde\u63a5\u3002<\/p>\n

\u5982\u679c\u7535\u673a\u603b\u5171\u6709 5 \u6839\u7535\u7ebf\u51fa\u6765\uff0c\u5219 4 \u6839\u662f\u4fe1\u53f7\u7ebf\uff0c1 \u6839\u662f\u4e24\u4e2a\u7ebf\u5708\u7684\u4e2d\u5fc3\u62bd\u5934\u3002\u559c\u6b22\u8fd9\u4e2a\u3002<\/p>\n

\"poYBAGNuEcGAZ6LZAABWmHYxp-c152\"<\/p>\n

\u8981\u68c0\u67e5\u54ea\u6839\u7535\u7ebf\u5c45\u4e2d\u62bd\u5934\u6216\u54ea\u6839\u662f\u4fe1\u53f7\u7ebf\uff0c\u60a8\u5fc5\u987b\u68c0\u67e5\u4ece\u7535\u673a\u51fa\u6765\u7684\u7535\u7ebf\u7684\u7535\u963b\u3002\u56e0\u6b64\uff0c\u4e0e\u4e2d\u5fc3\u62bd\u5934\u7684\u7535\u963b\u76f8\u6bd4\uff0c\u4e0e\u540c\u4e00\u7ebf\u5708\u8fde\u63a5\u7684\u90a3\u4e9b\u5bfc\u7ebf\u5177\u6709\u5f88\u9ad8\u7684\u7535\u963b\u503c\u3002<\/p>\n

\u5728\u4e0a\u56fe\u4e2d\uff0c\u5982\u679c\u6211\u4eec\u68c0\u67e5\u4e86\u84dd\u8272\u548c\u9ec4\u8272\u7535\u7ebf\u7684\u7535\u963b\u503c\uff0c\u5e76\u4e14\u5b83\u4eec\u4e4b\u95f4\u7684\u7535\u963b\u5927\u4e8e\u9ec4\u8272\u548c\u7ea2\u8272\u6216\u84dd\u8272\u548c\u7ea2\u8272\u4e4b\u95f4\u7684\u503c\u3002\u6240\u4ee5\uff0c\u7ea2\u8272\u662f\u5c45\u4e2d\u7684\u4e1d\u7ebf\u3002<\/p>\n

ULN2003 \u6b65\u8fdb\u7535\u673a\u9a71\u52a8\u5668\uff1a<\/p>\n

\u5927\u591a\u6570\u6b65\u8fdb\u7535\u673a\u53ea\u80fd\u5728\u9a71\u52a8\u5668\u6a21\u5757\u7684\u5e2e\u52a9\u4e0b\u8fd0\u884c\u3002\u8fd9\u662f\u56e0\u4e3a\u63a7\u5236\u5668\u6a21\u5757\uff08\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\u4e3aMSP\uff09\u5c06\u65e0\u6cd5\u4ece\u5176I \/ O\u5f15\u811a\u63d0\u4f9b\u8db3\u591f\u7684\u7535\u6d41<\/u>\u4f9b\u7535\u673a\u8fd0\u884c\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u5c06\u4f7f\u7528ULN2003\u6a21\u5757\u7b49\u5916\u90e8\u6a21\u5757\u4f5c\u4e3a\u6b65\u8fdb\u7535\u673a\u9a71\u52a8\u5668\u3002\u9a71\u52a8\u5668\u6a21\u5757\u6709\u591a\u79cd\u7c7b\u578b\uff0c\u5176\u4e2d\u4e00\u79cd\u7684\u989d\u5b9a\u503c\u5c06\u6839\u636e\u6240\u7528\u7535\u673a\u7684\u7c7b\u578b\u800c\u53d8\u5316\u3002\u6240\u6709\u9a71\u52a8\u5668\u6a21\u5757\u7684\u4e3b\u8981\u539f\u7406\u662f\u6e90\u51fa\/\u5438\u6536\u8db3\u591f\u7684\u7535\u6d41\u4ee5\u4f7f\u7535\u673a\u8fd0\u884c\u3002<\/p>\n

\u5728\u672c\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528ULN2003\u7535\u673a\u9a71\u52a8\u5668<\/u>IC\u3002IC\u7684\u5f15\u811a\u56fe\u5982\u4e0b\uff1a<\/p>\n

\"poYBAGNuEcKANNzdAABQcZ6E12U946\"<\/p>\n

\u5982\u679c IC\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 4 \u4e2a\u8f93\u5165\u7aef\u53e3\u548c 4 \u4e2a\u8f93\u51fa\u7aef\u53e3\u3002<\/p>\n

\u6240\u9700\u6750\u6599\uff1a<\/p>\n

MSP430<\/p>\n

35BYJ46 \u621628-BYJ48 \u6b65\u8fdb\u7535\u673a<\/p>\n

ULN2003 \u96c6\u6210\u7535\u8def<\/p>\n

\u7535\u7ebf<\/p>\n

\u9762\u5305\u677f<\/p>\n

\u7535\u8def\u56fe\uff1a<\/p>\n

\"poYBAGNuEcSASUe4AADvAvLTajs800\"<\/p>\n

\u5728\u4e0a\u56fe\u4e2d\uff0c\u6b65\u8fdb\u5668\u7684\u7ea2\u7ebf\u672a\u4e0eIC\u7684PI<\/u>N5\u8fde\u63a5\u3002\u5b83\u5fc5\u987b\u4e0e5V\u8fde\u63a5\u3002\u6b65\u8fdb\u7535\u673a\u7684\u989c\u8272\u4ee3\u7801\u53ef\u80fd\u4e0e\u7535\u8def\u56fe\u4e2d\u7ed9\u51fa\u7684\u989c\u8272\u4e0d\u540c\u3002\u56e0\u6b64\uff0c\u5728\u68c0\u67e5\u6b63\u786e\u7684\u4fe1\u53f7\u7ebf\u540e\u8fde\u63a5\u7535\u7ebf\u3002<\/p>\n

\u6211\u4eec\u5c06\u4f7f\u7528Energia IDE\u7f16\u5199\u4ee3\u7801\u3002\u5b83\u4e0eArduino<\/u>\u00a0IDE\u76f8\u540c\uff0c\u6613\u4e8e\u4f7f\u7528\u3002\u9a71\u52a8\u6b65\u8fdb\u5668\u7684\u793a\u4f8b\u4ee3\u7801\u4e5f\u53ef\u4ee5\u5728Arduino IDE\u7684\u793a\u4f8b\u83dc\u5355\u4e2d\u627e\u5230\u3002<\/p>\n

\u4ee3\u7801\u548c\u5de5\u4f5c\u8bf4\u660e\uff1a<\/p>\n

\u5728\u6211\u4eec\u5f00\u59cb\u4f7f\u7528 MSP430 \u8fdb\u884c\u7f16\u7a0b\u4e4b\u524d\uff0c\u8ba9\u6211\u4eec\u4e86\u89e3\u7a0b\u5e8f\u5185\u90e8\u5b9e\u9645\u5e94\u8be5\u53d1\u751f\u7684\u60c5\u51b5\u3002\u6211\u4eec\u5c06\u4f7f\u7528 4 \u6b65\u5e8f\u5217\u65b9\u6cd5\uff0c\u56e0\u6b64\u6211\u4eec\u5c06\u6267\u884c\u56db\u4e2a\u6b65\u9aa4\u6765\u8fdb\u884c\u4e00\u6b21\u5b8c\u6574\u7684\u65cb\u8f6c\u3002\u5c06 A\u3001B\u3001C \u548c D \u89c6\u4e3a\u56db\u4e2a\u7ebf\u5708\u3002<\/p>\n

 <\/p>\n\n\n\n\n\n\n\n
\u6b65<\/td>\n\u5f15\u811a\u901a\u7535<\/td>\n\u7ebf\u5708\u901a\u7535<\/td>\n<\/tr>\n
\u6b65\u9aa4 1<\/td>\n6 \u548c 7<\/td>\nA \u548c B<\/td>\n<\/tr>\n
\u6b65\u9aa4 2<\/td>\n7 \u548c 8<\/td>\nB \u548c C<\/td>\n<\/tr>\n
\u6b65\u9aa4 3<\/td>\n8 \u548c 9<\/td>\nC \u548c D<\/td>\n<\/tr>\n
\u6b65\u9aa4 4<\/td>\n9 \u548c 6<\/td>\nD \u548c A<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

 <\/p>\n

\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u7f16\u5199MSP430\u6b65\u8fdb\u7535\u673a\u4ee3\u7801\u3002\u5b8c\u6574\u7684\u7a0b\u5e8f\u53ef\u4ee5\u5728\u6559\u7a0b\u7684\u672b\u5c3e\u627e\u5230\uff0c\u4e0b\u9762\u89e3\u91ca\u4e86\u51e0\u4e2a\u91cd\u8981\u7684\u884c\u3002<\/p>\n

\u6211\u4eec\u7684\u6b65\u8fdb\u7535\u673a\u6bcf\u8f6c\u7684\u6b65\u6570\u8ba1\u7b97\u4e3a 32;\u56e0\u6b64\uff0c\u6211\u4eec\u8f93\u5165\u5982\u4e0b\u884c\u6240\u793a<\/p>\n

const int STEPS = 32;<\/p>\n

\u63a5\u4e0b\u6765\uff0c\u60a8\u5fc5\u987b\u521b\u5efa\u5b9e\u4f8b\uff0c\u5728\u5176\u4e2d\u6307\u5b9a\u5df2\u8fde\u63a5\u6b65\u8fdb\u7535\u673a\u7684\u5f15\u811a\u3002<\/p>\n

Stepper myStepper (STEPS, 6, 7, 8, 9);<\/p>\n

\u7531\u4e8e\u6211\u4eec\u4f7f\u7528\u7684\u662f\u6b65\u8fdb\u5e93\uff0c\u56e0\u6b64\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u884c\u8bbe\u7f6e\u7535\u673a\u7684\u901f\u5ea6\u300235BYJ46\u6b65\u8fdb\u7535\u673a\u7684\u901f\u5ea6\u8303\u56f4\u57280\u5230200\u4e4b\u95f4\u3002<\/p>\n

Mystepper.setSpeed(200);<\/p>\n

\u73b0\u5728\uff0c\u4e3a\u4e86\u4f7f\u7535\u673a\u79fb\u52a8\u4e00\u6b65\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u884c\u3002<\/p>\n

myStepper.step(STEPS);<\/p>\n

\u7531\u4e8e\u6211\u4eec\u6709 32 \u4e2a\u6b65\u9aa4\u548c 64 \u4f5c\u4e3a\u9f7f\u8f6e\u6bd4\uff0c\u6211\u4eec\u9700\u8981\u79fb\u52a8 2048 \uff0832*64=2048\uff09\uff0c\u624d\u80fd\u5b8c\u6210\u4e00\u6b21\u65cb\u8f6c\u3002\u73b0\u5728\uff0c\u4e0a\u4f20\u4ee5\u4e0b\u4ee3\u7801\u5e76\u66f4\u6539\u7f16\u53f7\u3002\u6839\u636e\u60a8\u7684\u9700\u8981\u7684\u6b65\u9aa4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u00a0MSP430\u00a0\u8fde\u63a5\u6b65\u8fdb\u7535\u673a\u3002MSP-EXP430G2 \u662f\u5fb7\u5dde\u4eea\u5668\u63d0\u4f9b\u7684\u5f00\u53d1\u5de5\u5177\uff0c\u53c8\u540d […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/10696"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10696"}],"version-history":[{"count":1,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/10696\/revisions"}],"predecessor-version":[{"id":10702,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/10696\/revisions\/10702"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10696"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}