{"id":2400,"date":"2019-05-08T08:33:01","date_gmt":"2019-05-08T08:33:01","guid":{"rendered":""},"modified":"2019-05-08T16:33:25","modified_gmt":"2019-05-08T08:33:25","slug":"at89s51%e5%8d%95%e7%89%87%e6%9c%ba%e5%af%b98x8%e7%82%b9%e9%98%b5led%e7%9a%84%e6%8e%a7%e5%88%b6%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2400","title":{"rendered":"AT89S51\u5355\u7247\u673a\u5bf98X8\u70b9\u9635LED\u7684\u63a7\u5236\u8bbe\u8ba1"},"content":{"rendered":"
\n\t\u57288X8\u70b9\u9635LED\u4e0a\u663e\u793a\u67f1\u5f62\uff0c\u8ba9\u5176\u5148\u4ece\u5de6\u5f80\u53f3\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u5176\u6b21\u4ece\u53f3\u5f80\u5de6\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u518d\u6b21\u4ece\u4e0a\u5f80\u4e0b\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u6700\u540e\u4ece\u4e0b\u5f80\u4e0a\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u5982\u6b64\u5faa\u73af\u3002<\/p>\n
\n\t1\uff0e \u7a0b\u5e8f\u8bbe\u8ba1\u5185\u5bb9<\/p>\n
\n\t8X8\u70b9\u9635LED\u5de5\u4f5c\u539f\u7406\u8bf4\u660e \uff1a8X8\u70b9\u9635\u5171\u9700\u898164\u4e2a\u53d1\u5149\u4e8c\u6781\u7ba1<\/u>\u7ec4\u6210\uff0c\u4e14\u6bcf\u4e2a\u53d1\u5149\u4e8c\u6781\u7ba1<\/u>\u662f\u653e\u7f6e\u5728\u884c\u7ebf\u548c\u5217\u7ebf\u7684\u4ea4\u53c9\u70b9\u4e0a\uff0c\u5f53\u5bf9\u5e94\u7684\u67d0\u4e00\u5217\u7f6e1\u7535\u5e73\uff0c\u67d0\u4e00\u884c\u7f6e0\u7535\u5e73\uff0c\u5219\u76f8\u5e94\u7684\u4e8c\u6781\u7ba1\u5c31\u4eae\uff1b\u56e0\u6b64\u8981\u5b9e\u73b0\u4e00\u6839\u67f1\u5f62\u7684\u4eae\u6cd5\uff0c\u5982\u56fe49\u6240\u793a\uff0c\u5bf9\u5e94\u7684\u4e00\u5217\u4e3a\u4e00\u6839\u7ad6\u67f1\uff0c\u6216\u8005\u5bf9\u5e94\u7684\u4e00\u884c\u4e3a\u4e00\u6839\u6a2a\u67f1\uff0c\u56e0\u6b64\u5b9e\u73b0\u67f1\u7684\u4eae\u7684\u65b9\u6cd5\u5982\u4e0b\u6240\u8ff0\uff1a<\/p>\n
\n\t\u4e00\u6839\u7ad6\u67f1\uff1a\u5bf9\u5e94\u7684\u5217\u7f6e1\uff0c\u800c\u884c\u5219\u91c7\u7528\u626b\u63cf\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002<\/p>\n
\n\t\u4e00\u6839\u6a2a\u67f1\uff1a\u5bf9\u5e94\u7684\u884c\u7f6e0\uff0c\u800c\u5217\u5219\u91c7\u7528\u626b\u63cf\u7684\u65b9\u6cd5\u6765\u5b9e\u73b0\u3002<\/p>\n
\n\t2\uff0e \u786c\u4ef6\u7535\u8def<\/u><\/p>\n
\n\t<\/p>\n
\n\t3\uff0e\u6c47\u7f16\u6e90\u7a0b\u5e8f<\/p>\n
\n\tORG 00H<\/p>\n
\n\tSTART\uff1a NOP<\/p>\n
\n\tMOV R3\uff0c#3<\/p>\n
\n\tLOP2\uff1a MOV R4\uff0c#8<\/p>\n
\n\tMOV R2\uff0c#0<\/p>\n
\n\tLOP1\uff1a MOV P1\uff0c#0FFH<\/p>\n
\n\tMOV DPTR\uff0c#TABA<\/p>\n
\n\tMOV A\uff0cR2<\/p>\n
\n\tMOVC A\uff0c@A+DPTR<\/p>\n
\n\tMOV P3\uff0cA<\/p>\n
\n\tINC R2<\/p>\n
\n\tLCALL DELAY<\/p>\n
\n\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ff0c#10<\/p>\n
\n\tD2\uff1a MOV R6\uff0c#20<\/p>\n
\n\tD1\uff1a MOV R7\uff0c#248<\/p>\n
\n\tDJNZ R7\uff0c$<\/p>\n
\n\tDJNZ R6\uff0cD1<\/p>\n
\n\tDJNZ R5\uff0cD2<\/p>\n
\n\tRET<\/p>\n
\n\tTABA\uff1a DB 0FEH\uff0c0FDH\uff0c0FBH\uff0c0F7H\uff0c0EFH\uff0c0DFH\uff0c0BFH\uff0c07FH<\/p>\n
\n\tTABB\uff1a DB 01H\uff0c02H\uff0c04H\uff0c08H\uff0c10H\uff0c20H\uff0c40H\uff0c80H<\/p>\n
\n\tEND<\/p>\n
\n\t4\uff0eC51\u8bed\u8a00\u6e90\u7a0b\u5e8f<\/p>\n
\n\t#include<\/p>\n
\n\tunsigned char code taba\uff3b\uff3d={0xfe\uff0c0xfd\uff0c0xfb\uff0c0xf7\uff0c0xef\uff0c0xdf\uff0c0xbf\uff0c0x7f};<\/p>\n
\n\tunsigned char code tabb\uff3b\uff3d={0x01\uff0c0x02\uff0c0x04\uff0c0x08\uff0c0x10\uff0c0x20\uff0c0x40\uff0c0x80};<\/p>\n
\n\tvoid delay\uff08void\uff09<\/p>\n
\n\t{<\/p>\n
\n\tunsigned char i\uff0cj;<\/p>\n
\n\tfor\uff08i=10;i\u300b0;i--\uff09<\/p>\n
\n\tfor\uff08j=248;j\u300b0;j--\uff09;<\/p>\n
\n\t}<\/p>\n
\n\tvoid delay1\uff08void\uff09<\/p>\n
\n\t{<\/p>\n
\n\tunsigned char i\uff0cj\uff0ck;<\/p>\n
\n\tfor\uff08k=10;k\u300b0;k--\uff09<\/p>\n
\n\tfor\uff08i=20;i\u300b0;i--\uff09<\/p>\n
\n\tfor\uff08j=248;j\u300b0;j--\uff09;<\/p>\n
\n\t}<\/p>\n
\n\tvoid mai<\/u>n\uff08void\uff09<\/p>\n
\n\t{<\/p>\n
\n\tunsigned char i\uff0cj;<\/p>\n
\n\twhile\uff081\uff09<\/p>\n
\n\t{<\/p>\n
\n\tfor\uff08j=0;j\u300a3;j++\uff09\u3000\u3000\/\/from<\/u> left to right 3 ti<\/u>me<\/p>\n
\n\t{<\/p>\n
\n\tfor\uff08i=0;i\u300a8;i++\uff09<\/p>\n
\n\t{<\/p>\n
\n\tP3=taba\uff3bi\uff3d;<\/p>\n
\n\tP1=0xff;<\/p>\n
\n\tdelay1\uff08\uff09;<\/p>\n
\n\t}<\/p>\n
\n\t}<\/p>\n
\n\tfor\uff08j=0;j\u300a3;j++\uff09\u3000\u3000\/\/from right to left 3 TIme<\/p>\n
\n\t{<\/p>\n
\n\tfor\uff08i=0;i\u300a8;i++\uff09<\/p>\n
\n\t{<\/p>\n
\n\tP3=taba\uff3b7-i\uff3d;<\/p>\n
\n\tP1=0xff;<\/p>\n
\n\tdelay1\uff08\uff09;<\/p>\n
\n\t}<\/p>\n
\n\t}<\/p>\n
\n\tfor\uff08j=0;j\u300a3;j++\uff09\u3000\u3000\/\/from top to bottom 3 TIme<\/p>\n
\n\t{<\/p>\n
\n\tfor\uff08i=0;i\u300a8;i++\uff09<\/p>\n
\n\t{<\/p>\n
\n\tP3=0x00;<\/p>\n
\n\tP1=tabb\uff3b7-i\uff3d;<\/p>\n
\n\tdelay1\uff08\uff09;<\/p>\n
\n\t}<\/p>\n
\n\t}<\/p>\n
\n\tfor\uff08j=0;j\u300a3;j++\uff09\u3000\u3000\/\/from bottom to top 3 TIme<\/p>\n
\n\t{<\/p>\n
\n\tfor\uff08i=0;i\u300a8;i++\uff09<\/p>\n
\n\t{<\/p>\n
\n\tP3=0x00;<\/p>\n
\n\tP1=tabb\uff3bi\uff3d;<\/p>\n
\n\tdelay1\uff08\uff09;<\/p>\n
\n\t}<\/p>\n
\n\t}<\/p>\n
\n\t}<\/p>\n
\n\t}<\/p>\n","protected":false},"excerpt":{"rendered":"
\u57288X8\u70b9\u9635LED\u4e0a\u663e\u793a\u67f1\u5f62\uff0c\u8ba9\u5176\u5148\u4ece\u5de6\u5f80\u53f3\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u5176\u6b21\u4ece\u53f3\u5f80\u5de6\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u518d\u6b21\u4ece\u4e0a\u5f80\u4e0b\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u6700\u540e\u4ece\u4e0b\u5f80\u4e0a\u5e73\u6ed1\u79fb\u52a8\u4e09\u6b21\uff0c\u5982\u6b64\u5faa\u73af\u3002 1\uff0e \u7a0b\u5e8f\u8bbe\u8ba1\u5185\u5bb9 8X8\u70b9\u9635<\/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\/2400"}],"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=2400"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2400\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2400"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}