{"id":2856,"date":"2019-10-16T00:40:31","date_gmt":"2019-10-16T00:40:31","guid":{"rendered":""},"modified":"2019-10-16T08:40:59","modified_gmt":"2019-10-16T00:40:59","slug":"%e5%9f%ba%e4%ba%8e51%e5%8d%95%e7%89%87%e6%9c%ba%e7%9a%84%e7%ba%a2%e5%a4%96%e7%ba%bf%e9%81%a5%e6%8e%a7%e5%99%a8%e8%a7%a3%e7%a0%81%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2856","title":{"rendered":"\u57fa\u4e8e51\u5355\u7247\u673a\u7684\u7ea2\u5916\u7ebf\u9065\u63a7\u5668\u89e3\u7801\u7a0b\u5e8f\u8bbe\u8ba1"},"content":{"rendered":"

\n\t\u4e0b\u9762\u662f\u4e00\u4e2a\u5bf951\u5b9e\u9a8c\u677f\u914d\u5957\u7684\u7ea2\u5916<\/u>\u7ebf\u9065\u63a7\u5668<\/u>\u7684\u89e3\u7801\u7a0b\u5e8f\uff0c\u5b83\u53ef\u4ee5\u628a\u7ea2\u5916\u9065\u63a7\u5668\u6bcf\u4e00\u4e2a\u6309\u952e\u7684\u952e\u503c\u8bfb\u51fa\u6765\uff0c\u5e76\u4e14\u901a\u8fc7\u5b9e\u9a8c\u677f\u4e0aP1\u53e3\u76848\u4e2aLED<\/u>\u663e\u793a\u51fa\u6765\uff0c\u5728\u89e3\u7801\u6210\u529f\u7684\u540c\u65f6\u5e76\u4e14\u80fd\u53d1\u51fa“\u5600\u5600\u5600”\u7684\u63d0\u793a\u97f3\u3002<\/p>\n

\n\t\"\u57fa\u4e8e51\u5355\u7247\u673a\u7684\u7ea2\u5916\u7ebf\u9065\u63a7\u5668\u89e3\u7801\u7a0b\u5e8f\u8bbe\u8ba1\"<\/p>\n

\n\t <\/div>\n

\n\t;=================================================<\/p>\n

\n\t; \u7ea2\u5916\u9065\u63a7\u63a5\u6536<\/p>\n

\n\t;=================================================<\/p>\n

\n\t; ew51\u4eff\u771f\u7f16\u7a0b\u5668<\/u> \u914d\u5957\u5b9e\u9a8c\u677f\u5b66\u4e60\u4f8b\u7a0b<\/p>\n

\n\t;<\/p>\n

\n\t; \u4e2d\u5c71\u5355\u7247\u673a<\/u>\u5b66\u4e60\u7f51 \u667a\u4f73\u79d1\u6280 \u9038\u98ce<\/p>\n

\n\t;<\/p>\n

\n\t; http:\/\/www.zsMCU<\/u>.com<\/p>\n

\n\t; E-mai<\/u>l:info@zsmcu.com<\/p>\n

\n\t;=================================================<\/p>\n

\n\tORG 0000H<\/p>\n

\n\tMAIN\uff1a<\/p>\n

\n\tJNB P2.2\uff0cIR ;\u9065\u63a7\u626b\u63cf<\/p>\n

\n\tLJMP MAIN ;\u5728\u6b63\u5e38\u65e0\u9065\u63a7\u4fe1\u53f7\u65f6\uff0c\u4e00\u4f53\u5316\u7ea2\u5916\u63a5\u6536\u5934\u8f93\u51fa\u662f\u9ad8\u7535\u5e73\uff0c\u7a0b\u5e8f\u4e00\u76f4\u5728\u5faa\u73af\u3002<\/p>\n

\n\t;=================================================<\/p>\n

\n\t; \u89e3\u7801\u7a0b\u5e8f<\/p>\n

\n\tIR\uff1a<\/p>\n

\n\t;\u4ee5\u4e0b\u5bf9\u9065\u63a7\u4fe1\u53f7\u76849000\u5fae\u79d2\u7684\u521d\u59cb\u4f4e\u7535\u5e73\u4fe1\u53f7\u7684\u8bc6\u522b\uff0c\u6ce2\u5f62\u89c1\u56fe\uff15\u3002<\/p>\n

\n\tMOV R6\uff0c#10<\/p>\n

\n\tIR_SB\uff1a<\/p>\n

\n\tACALL DELAY882 ;\u8c03\u7528882\u5fae\u79d2\u5ef6\u65f6\u5b50\u7a0b\u5e8f<\/p>\n

\n\tJB P2.2\uff0cIR_ERROR ;\u5ef6\u65f6882\u5fae\u79d2\u540e\u5224\u65adP2.2\u811a\u662f\u5426\u51fa\u73b0\u9ad8\u7535\u5e73\u5982\u679c\u6709\u5c31\u9000\u51fa\u89e3\u7801\u7a0b\u5e8f<\/p>\n

\n\tDJNZ R6\uff0cIR_SB ;\u91cd\u590d10\u6b21\uff0c\u76ee\u7684\u662f\u68c0\u6d4b\u57288820\u5fae\u79d2\u5185\u5982\u679c\u51fa\u73b0\u9ad8\u7535\u5e73\u5c31\u9000\u51fa\u89e3\u7801\u7a0b\u5e8f<\/p>\n

\n\t;\u8bc6\u522b\u8fde\u53d1\u7801\uff0c\u548c\u8df3\u8fc74.5ma\u7684\u9ad8\u7535\u5e73\u3002<\/p>\n

\n\tJNB P2.2\uff0c $ ;\u7b49\u5f85\u9ad8\u7535\u5e73\u907f\u5f009\u6beb\u79d2\u4f4e\u7535\u5e73\u5f15\u5bfc\u8109\u51b2<\/p>\n

\n\tACALL DELAY2400<\/p>\n

\n\tJNB P2.2\uff0cIR_Rp ;\u8fd9\u91cc\u4e3a\u4f4e\u7535\u5e73\uff0c\u8ba4\u4e3a\u662f\u8fde\u53d1\u7801\u4fe1\u53f7\uff0c\u89c1\u56fe\uff16\u3002<\/p>\n

\n\tACALL DELAY2400 ;\u5ef6\u65f64.74\u6beb\u79d2\u907f\u5f004.5\u6beb\u79d2\u7684\u7ed3\u679c\u7801<\/p>\n

\n\t;\u4ee5\u4e0b32\u6570\u636e\u7801\u7684\u8bfb\u53d6\u3000\uff0c\uff10\u548c\uff11\u7684\u8bc6\u522b\u3000\u8bf7\u770b\u56fe\uff12<\/p>\n

\n\tMOV R1\uff0c#1AH ;\u8bbe\u5b9a1AH\u4e3a\u8d77\u59cbRAM<\/u>\u533a<\/p>\n

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

\n\tIR_4BYTE<\/u>\uff1a<\/p>\n

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

\n\tIR_8BIT\uff1a<\/p>\n

\n\tJNB P2.2\uff0c$ ;\u7b49\u5f85\u5730\u5740\u7801\u7b2c\u4e00\u4f4d\u7684\u9ad8\u7535\u5e73\u4fe1\u53f7<\/p>\n

\n\tLCALL DELAY882 ;\u9ad8\u7535\u5e73\u5f00\u59cb\u540e\u7528882\u5fae\u79d2\u7684\u65f6\u95f4\u5c3a\u53bb\u5224\u65ad\u4fe1\u53f7\u6b64\u65f6\u7684\u9ad8\u4f4e\u7535\u5e73\u72b6\u6001<\/p>\n

\n\tMOV C\uff0cP2.2 ;\u5c06P2.2\u5f15\u811a\u6b64\u65f6\u7684\u7535\u5e73\u72b6\u60010\u62161\u5b58\u5165C\u4e2d<\/p>\n

\n\tJNC IR_8BIT_0 ;\u5982\u679c\u4e3a0\u5c31\u8df3\u8f6c\u5230IR_8BIT_0<\/p>\n

\n\tLCALL DELAY1000<\/p>\n

\n\tIR_8BIT_0\uff1a<\/p>\n

\n\tMOV A\uff0c@R1 ;\u5c06R1\u4e2d\u5730\u5740\u7684\u7ed9A<\/p>\n

\n\tRRC A ;\u5c06C\u4e2d\u7684\u503c0\u62161\u79fb\u5165A\u4e2d\u7684\u6700\u4f4e\u4f4d<\/p>\n

\n\tMOV @R1\uff0cA ;\u5c06A\u4e2d\u7684\u6570\u6682\u65f6\u5b58\u653e\u5728R1\u4e2d<\/p>\n

\n\tDJNZ R3\uff0cIR_8BIT ;\u63a5\u6536\u5730\u5740\u7801\u7684\u9ad88\u4f4d<\/p>\n

\n\tINC R1 ;\u5bf9R1\u4e2d\u7684\u503c\u52a01\uff0c\u6362\u4e0b\u4e00\u4e2aRAM<\/p>\n

\n\tDJNZ R2\uff0cIR_4BYTE ;\u63a5\u6536\u5b8c16\u4f4d\u5730\u5740\u7801\u548c8\u4f4d\u6570\u636e\u7801\u548c8\u4f4d\u6570\u636e\uff0c<\/p>\n

\n\t;\u5b58\u653e\u57281AH\/1BH\/1CH\/1DH\u7684RAM\u4e2d<\/p>\n

\n\t;\u89e3\u7801\u6210\u529f<\/p>\n

\n\tJMP IR_GOTO<\/p>\n

\n\tIR_Rp\uff1a<\/p>\n

\n\t;\u8fd9\u91cc\u4e3a\u91cd\u590d\u7801\u6267\u884c\u5904<\/p>\n

\n\t;\u6309\u4f4f\u9065\u63a7\u6309\u952e\u65f6\uff0c\u6bcf\u8fc7108ms\u5c31\u5230\u8fd9\u91cc\u6765<\/p>\n

\n\tJMP IR_GOTO<\/p>\n

\n\tIR_ERROR\uff1a<\/p>\n

\n\t;\u9519\u8bed\u9000\u51fa<\/p>\n

\n\tLJMP MAIN ;\u9000\u51fa\u89e3\u7801\u5b50\u7a0b\u5e8f<\/p>\n

\n\t;=================================================<\/p>\n

\n\t;\u9065\u63a7\u6267\u884c\u90e8\u4efd<\/p>\n

\n\tIR_GOTO\uff1a<\/p>\n

\n\t;\u8fd9\u91cc\u8fd8\u8981\u5224\u65ad1AH\u548c1BH\u3000\u4e24\u4e2a\u7cfb\u7edf\u7801\u6216\u7528\u6237\u7801\uff0c\u7528\u4e8e\u8bc6\u522b\u4e0d\u540c\u7684\u9065\u63a7\u5668<\/p>\n

\n\t;MOV A\uff0c1AH<\/p>\n

\n\t;CJNE A\uff0c#xxH\uff0cIR_ERROR ;\u7528\u6237\u7801\uff11\u4e0d\u5bf9\u5219\u9000\u51fa<\/p>\n

\n\t;MOV A\uff0c1BH<\/p>\n

\n\t;CJNE A\uff0c#xxH\uff0cIR_ERROR ;\u7528\u6237\u7801\uff12\u4e0d\u5bf9\u5219\u9000\u51fa<\/p>\n

\n\t;\u5224\u65ad\u4e24\u4e2a\u6570\u636e\u7801\u662f\u5426\u76f8\u53cd<\/p>\n

\n\tMOV A\uff0c1CH<\/p>\n

\n\tCPL A<\/p>\n

\n\tCJNE A\uff0c1DH\uff0cIR_ERROR ;\u4e24\u4e2a\u6570\u636e\u7801\u4e0d\u76f8\u53cd\u5219\u9000\u51fa<\/p>\n

\n\t;\u9065\u63a7\u6267\u884c\u90e8\u4efd<\/p>\n

\n\t;MOV A\uff0c1DH ;\u5224\u65ad\u5bf9\u5e94\u6309\u952e<\/p>\n

\n\t;CJNE A\uff0c#xxH\uff0c{1}6<\/p>\n

\n\t;LJMP -à\u8df3\u5230\u5bf9\u5e94\u6309\u952e\u6267\u884c\u5904<\/p>\n

\n\t;CJNE A\uff0c#xxH\uff0c{1}6<\/p>\n

\n\t;LJMP -à\u8df3\u5230\u5bf9\u5e94\u6309\u952e\u6267\u884c\u5904<\/p>\n

\n\t;\u3002<\/p>\n

\n\tMOV P1\uff0c1DH ;\u5c06\u6309\u952e\u7684\u952e\u503c\u901a\u8fc7P1\u53e3\u76848\u4e2aLED\u663e\u793a\u51fa\u6765\uff01<\/p>\n

\n\tCLR P2.3 ;\u8702\u9e23\u5668<\/u>\u9e23\u54cd\uff0d\u5600\u5600\u5600\uff0d\u7684\u58f0\u97f3\uff0c\u8868\u793a\u89e3\u7801\u6210\u529f<\/p>\n

\n\tLCALL DELAY2400<\/p>\n

\n\tLCALL DELAY2400<\/p>\n

\n\tLCALL DELAY2400<\/p>\n

\n\tSETB P2.3 ;\u8702\u9e23\u5668\u505c\u6b62<\/p>\n

\n\t;\u6e05\u9664\u9065\u63a7\u503c\u4f7f\u8fde\u6309\u5931\u6548<\/p>\n

\n\tMOV 1AH\uff0c#00H<\/p>\n

\n\tMOV 1BH\uff0c#00H<\/p>\n

\n\tMOV 1CH\uff0c#00H<\/p>\n

\n\tMOV 1DH\uff0c#00H<\/p>\n

\n\tLJMP MAIN<\/p>\n

\n\t;=================================================<\/p>\n

\n\t; \u5ef6\u65f6\u5b50\u7a0b\u5e8f<\/p>\n

\n\t;=============================882<\/p>\n

\n\tDELAY882\uff1a ;1.085x \uff08\uff08202x4\uff09+5\uff09=882<\/p>\n

\n\tMOV R7\uff0c#202<\/p>\n

\n\tDELAY882_A\uff1a<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tDJNZ R7\uff0cDELAY882_A<\/p>\n

\n\tRET<\/p>\n

\n\t;=============================1000<\/p>\n

\n\tDELAY1000\uff1a ;1.085x \uff08\uff08229x4\uff09+5\uff09=999.285<\/p>\n

\n\tMOV R7\uff0c#229<\/p>\n

\n\tDELAY1000_A\uff1a<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tDJNZ R7\uff0cDELAY1000_A<\/p>\n

\n\tRET<\/p>\n

\n\t;=============================2400<\/p>\n

\n\tDELAY2400\uff1a ;1.085x \uff08\uff08245x9\uff09+5\uff09=2397.85<\/p>\n

\n\tMOV R7\uff0c#245<\/p>\n

\n\tDELAY2400_A\uff1a<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tNOP<\/p>\n

\n\tDJNZ R7\uff0cDELAY2400_A<\/p>\n

\n\tRET<\/p>\n

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

\u4e0b\u9762\u662f\u4e00\u4e2a\u5bf951\u5b9e\u9a8c\u677f\u914d\u5957\u7684 \u7ea2\u5916 \u7ebf \u9065\u63a7\u5668 \u7684\u89e3\u7801\u7a0b\u5e8f\uff0c\u5b83\u53ef\u4ee5\u628a\u7ea2\u5916\u9065\u63a7\u5668\u6bcf\u4e00\u4e2a\u6309\u952e\u7684\u952e\u503c\u8bfb\u51fa\u6765\uff0c\u5e76\u4e14\u901a\u8fc7\u5b9e\u9a8c\u677f\u4e0aP1\u53e3\u76848\u4e2a LED \u663e\u793a\u51fa\u6765\uff0c\u5728\u89e3\u7801\u6210\u529f\u7684\u540c\u65f6\u5e76\u4e14\u80fd\u53d1\u51fa\u5600\u5600<\/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\/2856"}],"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=2856"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2856\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2856"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}