{"id":2790,"date":"2019-09-04T06:27:35","date_gmt":"2019-09-04T06:27:35","guid":{"rendered":""},"modified":"2019-09-04T14:28:02","modified_gmt":"2019-09-04T06:28:02","slug":"%e5%9f%ba%e4%ba%8epic%e5%8d%95%e7%89%87%e6%9c%ba%e7%9a%84%e6%91%a9%e6%89%98%e8%bd%a6%e9%98%b2%e7%9b%97%e5%99%a8%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2790","title":{"rendered":"\u57fa\u4e8ePIC\u5355\u7247\u673a\u7684\u6469\u6258\u8f66\u9632\u76d7\u5668\u8bbe\u8ba1"},"content":{"rendered":"

\n\tR3EQU0X03PORT5EQU0X05PORT6EQU0X06R3EQU0X03KEY_STATUSEQU0X10;\u4f4e\u534a\u5b57\u8282\u4e3a\u6309\u952e\u6807\u5fd7\uff0c\u9ad8\u534a\u5b57\u8282\u4e3a\u63a7\u5236\u6807\u5fd7SIGNAL_LOWEQU0X11;\u4fe1\u53f7\u7535\u5e73\u4f4e\u8ba1\u6570\u5668SIGNAL_HIGHEQU0X12;\u4fe1\u53f7\u7535\u5e73\u9ad8\u8ba1\u6570\u5668DATA_RECORDEREQU0X1<\/p>\n

\n\t\"\u57fa\u4e8ePIC\u5355\u7247\u673a\u7684\u6469\u6258\u8f66\u9632\u76d7\u5668\u8bbe\u8ba1\"<\/p>\n

\n\t <\/div>\n

\n\tR3EQU0X03<\/p>\n

\n\tPORT5EQU0X05<\/p>\n

\n\tPORT6EQU0X06<\/p>\n

\n\tR3EQU0X03<\/p>\n

\n\tKEY_STATUSEQU0X10;\u4f4e\u534a\u5b57\u8282\u4e3a\u6309\u952e\u6807\u5fd7\uff0c\u9ad8\u534a\u5b57\u8282\u4e3a\u63a7\u5236\u6807\u5fd7<\/p>\n

\n\tSIGNAL_LOWEQU0X11;\u4fe1\u53f7\u7535\u5e73\u4f4e\u8ba1\u6570\u5668<\/p>\n

\n\tSIGNAL_HIGHEQU0X12;\u4fe1\u53f7\u7535\u5e73\u9ad8\u8ba1\u6570\u5668<\/p>\n

\n\tDATA_RECORDEREQU0X13;\u63a5\u6536\u7801\u6570\u636e\u5b57\u8282<\/p>\n

\n\tCODE_RECORDER2EQU0X14;\u63a5\u6536\u7801\u5730\u5740\u9ad8\u5b57\u8282<\/p>\n

\n\tCODE_RECORDER1EQU0X15;\u63a5\u6536\u7801\u5730\u5740\u4f4e\u5b57\u8282<\/p>\n

\n\tCODE_TOTALEQU0X16;\u63a5\u6536\u6570\u636e\u4f4d\u8ba1\u6570\u5668<\/p>\n

\n\tKEY_COUNTE<\/u>REQU0X17;\u4e24\u6b21\u6309\u952e\u68c0\u6d4b\u8ba1\u6570\u5668<\/p>\n

\n\t\/**********************KEY_STATUS\u6807\u5fd7\u4f4d\u5b9a\u4e49***********************************\/<\/p>\n

\n\tAUTORUN_KEYEQU0;\u9065\u63a7\u952e\u6807\u5fd7<\/p>\n

\n\tLOCK_KEYEQU1;\u9632\u76d7\u952e\u6807\u5fd7<\/p>\n

\n\tSEARCH_KEYEQU2;\u5bfb\u8f66\u952e\u6807\u5fd7<\/p>\n

\n\tOPEN_KEYEQU3;\u89e3\u9664\u952e\u6807\u5fd7<\/p>\n

\n\tPRESS_FLAGEQU4;\u6709\u952e\u6309\u4e0b\u6807\u5fd7<\/p>\n

\n\tCHECK_FLAGEQU5;\u6821\u9a8c\u6807\u5fd7<\/p>\n

\n\t\/***********************CONSTANTDEFINE*************************************\/<\/p>\n

\n\tCODE_ADDRESS1EQU0B10001100;\u9065\u63a7\u5668<\/u>\u5730\u5740\u7801\uff0c\u66f4\u6539\u5e38\u6570\u5373\u53ef\u5b9e\u73b0\u5176\u4ed6\u9065\u63a7\u5668\u6536\u7801<\/p>\n

\n\tCODE_ADDRESS2EQU0B00101100<\/p>\n

\n\tAUTORUN_VALUEEQU0B00000011;\u9065\u63a7\u5668\u76f8\u5e94\u952e\u503c\uff0c\u6539\u53d8\u76f8\u5e94\u6570\u503c\u5373\u53ef\u66f4\u6539\u5176\u529f\u80fd<\/p>\n

\n\tLOCK_VALUEEQU0B00001100<\/p>\n

\n\tSEARCH_VALUEEQU0B00110000<\/p>\n

\n\tOPEN_VALUEEQU0B11000000<\/p>\n

\n\t\/**********************\u5f53PORT6.2\u53e3\u7535\u5e73\u4e3a\u9ad8\u65f6\u8c03\u7528\u8be5\u7a0b\u5e8f\u6536\u7801******************\/<\/p>\n

\n\t;PORT6.2\u4e3a\u4fe1\u53f7\u8f93\u5165\u53e3<\/p>\n

\n\tcollect_2262\uff1a<\/p>\n

\n\tMOV a\uff0c@0xf0<\/p>\n

\n\tAndKEY_STATUS\uff0ca<\/p>\n

\n\tclrcode_total<\/p>\n

\n\tclrs<\/u>ignal_high<\/p>\n

\n\tcollect1\uff1a<\/p>\n

\n\tincsi<\/u>gnal_high<\/p>\n

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

\n\tSUBA\uff0c@30<\/p>\n

\n\tJBSR3\uff0c0<\/p>\n

\n\tRET<\/p>\n

\n\tclrsignal_low<\/p>\n

\n\tcalldelay20us<\/p>\n

\n\tjbsport6\uff0c2<\/p>\n

\n\tjmpcollect_low<\/p>\n

\n\tjmpcollect1<\/p>\n

\n\tcollect_low\uff1a<\/p>\n

\n\tMOV a\uff0csignal_high;\u4fe1\u53f7\u9ad8\u7535\u5e73\u5bbd\u5ea6\u300a80US\u65f6\u6ee4\u9664<\/p>\n

\n\tsuba\uff0c@4<\/p>\n

\n\tjbcr3\uff0c0<\/p>\n

\n\tret<\/p>\n

\n\tMOV a\uff0c@20;\u4fe1\u53f7\u9ad8\u7535\u5e73\u5bbd\u5ea6\u572880—400US\u65f6\u4e3a\u91c7\u96c6\u4e3a0<\/p>\n

\n\tsuba\uff0csignal_high;\u4fe1\u53f7\u9ad8\u7535\u5e73\u5bbd\u5ea6\u5728400US\u4ee5\u4e0a\u65f6\u4e3a\u91c7\u96c6\u4e3a1<\/p>\n

\n\trrcdata_recorder<\/p>\n

\n\trrccode_recorder2<\/p>\n

\n\trrccode_recorder1<\/p>\n

\n\tinccode_total<\/p>\n

\n\tclrsignal_high<\/p>\n

\n\tMOV a\uff0c@24<\/p>\n

\n\txora\uff0ccode_total<\/p>\n

\n\tjbcr3\uff0c2<\/p>\n

\n\tjmpcollect_end<\/p>\n

\n\tinput_low\uff1a<\/p>\n

\n\tincsignal_low<\/p>\n

\n\tMOV a\uff0csignal_low;\u4fe1\u53f7\u4f4e\u7535\u5e73\u5bbd\u5ea6\u5927\u4e8e800US\u65f6\u6ee4\u9664<\/p>\n

\n\tsuba\uff0c@40<\/p>\n

\n\tjbsr3\uff0c0<\/p>\n

\n\tret<\/p>\n

\n\tcalldelay20us<\/p>\n

\n\tjbsport6\uff0c2;3<\/p>\n

\n\tjmpi<\/u>nput_low<\/p>\n

\n\tjmpcollect1<\/p>\n

\n\tcollect_end\uff1a<\/p>\n

\n\tMOV a\uff0ccode_recorder1;\u6821\u9a8c\u4f4e\u5b57\u8282\u5730\u5740<\/p>\n

\n\txora\uff0c@code_address1<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tret<\/p>\n

\n\tMOV a\uff0ccode_recorder2;\u6821\u9a8c\u9ad8\u5b57\u8282\u5730\u5740<\/p>\n

\n\txora\uff0c@code_address2<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tret<\/p>\n

\n\tjbsKEY_STATUS\uff0ccheck_flag;\u662f\u5426\u662f\u7b2c\u4e00\u4e32\u6536\u7801\uff1f<\/p>\n

\n\tjmps<\/u>torage_data<\/p>\n

\n\tbcKEY_STATUS\uff0ccheck_flag<\/p>\n

\n\tMOV a\uff0ccom_data_rec<\/p>\n

\n\txora\uff0cdata_recorder<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tjmpstorage_data<\/p>\n

\n\tMOV a\uff0cdata_recorder<\/p>\n

\n\txora\uff0c@autorun_value;\u662f\u542f\u52a8\u952e\uff1f<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tjmpkey1<\/p>\n

\n\tbsKEY_STATUS\uff0cautorun_key;\u7f6e\u542f\u52a8\u952e\u6807\u5fd7<\/p>\n

\n\tbsKEY_STATUS\uff0cpress_flag;\u7f6e\u6709\u952e\u6309\u4e0b\u6807\u5fd7<\/p>\n

\n\tclrkey_counter;\u6e05\u9664\u6309\u952e\u95f4\u9694\u8ba1\u6570\u5668<\/p>\n

\n\tret<\/p>\n

\n\tkey1\uff1a<\/p>\n

\n\tMOV a\uff0cdata_recorder<\/p>\n

\n\txora\uff0c@open_value;\u662f\u89e3\u9664\u952e\uff1f<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tjmpkey2<\/p>\n

\n\tbsKEY_STATUS\uff0copen_key<\/p>\n

\n\tbsKEY_STATUS\uff0cpress_flag<\/p>\n

\n\tclrkey_counter<\/p>\n

\n\tret<\/p>\n

\n\tkey2\uff1a<\/p>\n

\n\tMOV a\uff0cdata_recorder<\/p>\n

\n\tanda\uff0c@0x0c;\u540c\u65f6\u6709\u4e24\u4e2a\u952e\u6309\u4e0b\u65f6\u4e0d\u4e3a0X30<\/p>\n

\n\txora\uff0c@lock_value;\u662f\u9632\u76d7\u952e\uff1f<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tjmpkey3<\/p>\n

\n\tbsKEY_STATUS\uff0clock_key<\/p>\n

\n\tbsKEY_STATUS\uff0cpress_flag<\/p>\n

\n\tclrkey_counter<\/p>\n

\n\tkey3\uff1a<\/p>\n

\n\tMOV a\uff0cdata_recorder<\/p>\n

\n\tanda\uff0c@0x30<\/p>\n

\n\txora\uff0c@search_value;\u662f\u5bfb\u8f66\u952e\uff1f<\/p>\n

\n\tjbsr3\uff0c2<\/p>\n

\n\tret<\/p>\n

\n\tbsKEY_STATUS\uff0csearch_key<\/p>\n

\n\tbsKEY_STATUS\uff0cpress_flag<\/p>\n

\n\tclrkey_counter<\/p>\n

\n\tret<\/p>\n

\n\tstorage_data\uff1a;\u7b2c\u4e00\u6b21\u6536\u7801\u5b58\u50a8<\/u>\u6570\u636e\u5b57\u8282<\/p>\n

\n\tbsKEY_STATUS\uff0ccheck_flag<\/p>\n

\n\tMOV a\uff0cdata_recorder<\/p>\n

\n\tMOV com_data_rec\uff0ca<\/p>\n

\n\tret<\/p>\n

\n\tdelay20us\uff1a<\/p>\n

\n\twdtc<\/p>\n

\n\tMOV a\uff0c@3;9<\/p>\n

\n\tMOV delay1\uff0ca<\/p>\n

\n\tdelay20us_1\uff1a<\/p>\n

\n\tnop<\/p>\n

\n\tdjzdelay1<\/p>\n

\n\tjmpdelay20us_1<\/p>\n

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

R3EQU0X03PORT5EQU0X05PORT6EQU0X06R3EQU0X03KEY_STATUSEQU0X10;\u4f4e\u534a\u5b57\u8282\u4e3a\u6309\u952e\u6807\u5fd7\uff0c\u9ad8\u534a\u5b57\u8282\u4e3a\u63a7\u5236\u6807\u5fd7SIGNAL_LOWEQU0X11;\u4fe1\u53f7\u7535\u5e73\u4f4e\u8ba1\u6570\u5668SIGNAL_HIGHEQU0X12;\u4fe1\u53f7\u7535\u5e73\u9ad8\u8ba1\u6570\u5668DATA_RECORDEREQU0X1 R3EQU0X03 PORT5EQU<\/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\/2790"}],"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=2790"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2790\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2790"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}