{"id":2426,"date":"2019-05-14T07:51:27","date_gmt":"2019-05-14T07:51:27","guid":{"rendered":""},"modified":"2019-05-14T15:52:07","modified_gmt":"2019-05-14T07:52:07","slug":"at89s51%e5%8d%95%e7%89%87%e6%9c%ba%e5%b9%bf%e5%91%8a%e7%81%af%e7%94%b5%e8%b7%af%e7%9a%84%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2426","title":{"rendered":"AT89S51\u5355\u7247\u673a\u5e7f\u544a\u706f\u7535\u8def\u7684\u8bbe\u8ba1"},"content":{"rendered":"

\n\t1\uff0e\u5b9e\u9a8c\u4efb\u52a1<\/p>\n

\n\t\u505a\u5355\u4e00\u706f\u7684\u5de6\u79fb\u53f3\u79fb\uff0c\u786c\u4ef6\u7535\u8def<\/u>\u5982\u56fe4.4.1\u6240\u793a\uff0c\u516b\u4e2a\u53d1\u5149\u4e8c\u6781\u7ba1<\/u>L1\uff0dL8\u5206\u522b\u63a5\u5728\u5355\u7247\u673a<\/u>\u7684P1.0\uff0dP1.7\u63a5\u53e3\u4e0a\uff0c\u8f93\u51fa“0”\u65f6\uff0c\u53d1\u5149\u4e8c\u6781\u7ba1<\/u>\u4eae\uff0c\u5f00\u59cb\u65f6P1.0→P1.1→P1.2→P1.3→\u2505→P1.7→P1.6→\u2505→P1.0\u4eae\uff0c\u91cd\u590d\u5faa\u73af\u3002<\/p>\n

\n\t <\/div>\n

\n\t2\uff0e\u7535\u8def\u539f\u7406\u56fe<\/p>\n

\n\t\"AT89S51\u5355\u7247\u673a\u5e7f\u544a\u706f\u7535\u8def\u7684\u8bbe\u8ba1\"<\/p>\n

\n\t\u56fe4.4.1<\/p>\n

\n\t3\uff0e\u7cfb\u7edf\u677f\u4e0a\u786c\u4ef6\u8fde\u7ebf<\/p>\n

\n\t\u628a“\u5355\u7247\u673a\u7cfb\u7edf”\u533a\u57df\u4e2d\u7684P1.0\uff0dP1.7\u75288\u82af\u6392\u7ebf\u8fde\u63a5\u5230“\u516b\u8def\u53d1\u5149\u4e8c\u6781\u7ba1\u6307\u793a\u6a21\u5757”\u533a\u57df\u4e2d\u7684L1\uff0dL8\u7aef\u53e3\u4e0a\uff0c\u8981\u6c42\uff1aP1.0\u5bf9\u5e94\u7740L1\uff0cP1.1\u5bf9\u5e94\u7740L2\uff0c……\uff0cP1.7\u5bf9\u5e94\u7740L8\u3002<\/p>\n

\n\t4\uff0e\u7a0b\u5e8f\u8bbe\u8ba1\u5185\u5bb9<\/p>\n

\n\t\u6211\u4eec\u53ef\u4ee5\u8fd0\u7528\u8f93\u51fa\u7aef\u53e3\u6307\u4ee4MOV\u3000P1\uff0cA\u6216MOV\u3000P1\uff0c\uff03DATA\uff0c\u53ea\u8981\u7ed9\u7d2f\u52a0\u5668\u503c\u6216\u5e38\u6570\u503c\uff0c\u7136\u540e\u6267\u884c\u4e0a\u8ff0\u7684\u6307\u4ee4\uff0c\u5373\u53ef\u8fbe\u5230\u8f93\u51fa\u63a7\u5236\u7684\u52a8\u4f5c\u3002<\/p>\n

\n\t\u6bcf\u6b21\u9001\u51fa\u7684\u6570\u636e\u662f\u4e0d\u540c\uff0c\u5177\u4f53\u7684\u6570\u636e\u5982\u4e0b\u88681\u6240\u793a<\/p>\n

\n\t\u88681<\/p>\n

\n\t5\uff0e\u7a0b\u5e8f\u6846\u56fe<\/p>\n

\n\t\"AT89S51\u5355\u7247\u673a\u5e7f\u544a\u706f\u7535\u8def\u7684\u8bbe\u8ba1\"<\/p>\n

\n\t\u56fe4.4.2<\/p>\n

\n\t6\uff0e\u6c47\u7f16\u6e90\u7a0b\u5e8f<\/p>\n

\n\tORG 0<\/p>\n

\n\tSTART\uff1a MOV R2\uff0c#8<\/p>\n

\n\tMOV A\uff0c#0FEH<\/p>\n

\n\tSETB C<\/p>\n

\n\tLOOP\uff1a MOV P1\uff0cA<\/p>\n

\n\tLCALL DELAY<\/p>\n

\n\tRLC A<\/p>\n

\n\tDJNZ R2\uff0cLOOP<\/p>\n

\n\tMOV R2\uff0c#8<\/p>\n

\n\tLOOP1\uff1a MOV P1\uff0cA<\/p>\n

\n\tLCALL DELAY<\/p>\n

\n\tRRC A<\/p>\n

\n\tDJNZ R2\uff0cLOOP1<\/p>\n

\n\tLJMP START<\/p>\n

\n\tDELAY\uff1a MOV R5\uff0c#20 ;<\/p>\n

\n\tD1\uff1a MOV R6\uff0c#20<\/p>\n

\n\tD2\uff1a MOV R7\uff0c#248<\/p>\n

\n\tDJNZ R7\uff0c$<\/p>\n

\n\tDJNZ R6\uff0cD2<\/p>\n

\n\tDJNZ R5\uff0cD1<\/p>\n

\n\tRET<\/p>\n

\n\tEND<\/p>\n

\n\t7\uff0eC\u8bed\u8a00\u6e90\u7a0b\u5e8f<\/p>\n

\n\t#include<\/p>\n

\n\tunsigned char i;<\/p>\n

\n\tunsigned char te<\/u>mp;<\/p>\n

\n\tunsigned char a\uff0cb;<\/p>\n

\n\tvoid delay\uff08void\uff09<\/p>\n

\n\t{<\/p>\n

\n\tunsigned char m\uff0cn\uff0cs;<\/p>\n

\n\tfor\uff08m=20;m\u300b0;m--\uff09<\/p>\n

\n\tfor\uff08n=20;n\u300b0;n--\uff09<\/p>\n

\n\tfor\uff08s=248;s\u300b0;s--\uff09;<\/p>\n

\n\t}<\/p>\n

\n\tvoid mai<\/u>n\uff08void\uff09<\/p>\n

\n\t{<\/p>\n

\n\twhile\uff081\uff09<\/p>\n

\n\t{<\/p>\n

\n\ttemp=0xfe;<\/p>\n

\n\tP1=temp;<\/p>\n

\n\tdelay\uff08\uff09;<\/p>\n

\n\tfor\uff08i=1;i\u300a8;i++\uff09<\/p>\n

\n\t{<\/p>\n

\n\ta=temp<\/p>\n

\n\tb=temp\u300b\u300b\uff088-i\uff09;<\/p>\n

\n\tP1=a|b;<\/p>\n

\n\tdelay\uff08\uff09;<\/p>\n

\n\t}<\/p>\n

\n\tfor\uff08i=1;i\u300a8;i++\uff09<\/p>\n

\n\t{<\/p>\n

\n\ta=temp\u300b\u300bi;<\/p>\n

\n\tb=temp\u300a\u300a\uff088-i\uff09;<\/p>\n

\n\tP1=a|b;<\/p>\n

\n\tdelay\uff08\uff09;<\/p>\n

\n\t}<\/p>\n

\n\t}<\/p>\n

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

1\uff0e\u5b9e\u9a8c\u4efb\u52a1 \u505a\u5355\u4e00\u706f\u7684\u5de6\u79fb\u53f3\u79fb\uff0c\u786c\u4ef6 \u7535\u8def \u5982\u56fe4.4.1\u6240\u793a\uff0c\u516b\u4e2a \u53d1\u5149\u4e8c\u6781\u7ba1 L1\uff0dL8\u5206\u522b\u63a5\u5728 \u5355\u7247\u673a \u7684P1.0\uff0dP1.7\u63a5\u53e3\u4e0a\uff0c\u8f93\u51fa0\u65f6\uff0c\u53d1\u5149 \u4e8c\u6781\u7ba1 \u4eae\uff0c\u5f00\u59cb\u65f6P1.0P1.1P1.2P1.3\u2505P1.7P1.6\u2505P1.0\u4eae<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2426"}],"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=2426"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2426\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2426"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}