{"id":2828,"date":"2019-09-27T08:44:34","date_gmt":"2019-09-27T08:44:34","guid":{"rendered":""},"modified":"2019-09-27T16:45:02","modified_gmt":"2019-09-27T08:45:02","slug":"%e5%9f%ba%e4%ba%8e%e5%8d%95%e7%89%87%e6%9c%ba%e5%92%8cc%e8%af%ad%e8%a8%80%e5%af%b9%e6%95%b0%e5%ad%97%e6%bb%a4%e6%b3%a2%e7%b3%bb%e7%bb%9f%e7%9a%84%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2828","title":{"rendered":"\u57fa\u4e8e\u5355\u7247\u673a\u548cC\u8bed\u8a00\u5bf9\u6570\u5b57\u6ee4\u6ce2\u7cfb\u7edf\u7684\u8bbe\u8ba1"},"content":{"rendered":"

\n\t\u6570\u636e\u91c7\u96c6<\/u>\uff0c\u53c8\u79f0\u6570\u636e\u83b7\u53d6\uff0c\u662f\u5229\u7528\u4e00\u79cd\u88c5\u7f6e\uff0c\u4ece\u7cfb\u7edf\u5916\u90e8\u91c7\u96c6\u6570\u636e\u5e76\u8f93\u5165\u5230\u7cfb\u7edf\u5185\u90e8\u7684\u4e00\u4e2a\u63a5\u53e3<\/u>\u3002\u6570\u636e\u91c7\u96c6\u6280\u672f\u5e7f\u6cdb\u5f15\u7528\u5728\u5404\u4e2a\u9886\u57df\u3002\u6bd4\u5982\u6444\u50cf\u5934\uff0c\u9ea6\u514b\u98ce\uff0c\u90fd\u662f\u6570\u636e\u91c7\u96c6\u5de5\u5177\u3002\u88ab\u91c7\u96c6\u6570\u636e\u662f\u5df2\u88ab\u8f6c\u6362\u4e3a\u7535\u8baf\u53f7\u7684\u5404\u79cd\u7269\u7406\u91cf\uff0c\u5982\u6e29\u5ea6\u3001\u6c34\u4f4d\u3001\u98ce\u901f\u3001\u538b\u529b\u7b49\uff0c\u53ef\u4ee5\u662f\u6a21\u62df\u91cf\uff0c\u4e5f\u53ef\u4ee5\u662f\u6570\u5b57\u91cf\u3002\u5728\u4e92\u8054\u7f51\u884c\u4e1a\u5feb\u901f\u53d1\u5c55\u7684\u4eca\u5929\uff0c\u6570\u636e\u91c7\u96c6\u5df2\u7ecf\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u4e92\u8054\u7f51\u53ca\u5206\u5e03\u5f0f\u9886\u57df\uff0c\u6570\u636e\u91c7\u96c6\u9886\u57df\u5df2\u7ecf\u53d1\u751f\u4e86\u91cd\u8981\u7684\u53d8\u5316\u3002<\/p>\n

\n\t\u800c\u5728\u6570\u636e\u91c7\u96c6\u4e2d\u5b58\u5728\u7740\u5404\u79cd\u566a\u58f0\u3002\u6ee4\u9664\u566a\u58f0\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u65e2\u6709\u6570\u5b57\u6ee4\u6ce2\u5668<\/u>\uff0c\u4e5f\u6709\u6a21\u62df\u6ee4\u6ce2\u5668\u3002\u8fd9\u91cc\u6211\u4eec\u91c7\u7528\u4e86\u57fa\u4e8e\u5355\u7247\u673a<\/u>\u548cC\u8bed\u8a00\u6765\u8bbe\u8ba1\u5e76\u5f00\u53d1\u6570\u5b57\u6ee4\u6ce2\u7cfb\u7edf\u3002<\/p>\n

\n\t <\/div>\n

\n\t\u6211\u4eec\u9488\u5bf9\u4e8e\u5355\u7247\u673a\u6570\u636e\u91c7\u96c6\u7cfb\u7edf\u4e2d\u7ecf\u5e38\u51fa\u73b0\u7684\u968f\u673a\u5e72\u6270\uff0c\u901a\u8fc7\u624b\u52a8\u8f93\u5165\u6765\u6a21\u62df\u6570\u636e\u91c7\u96c6\u8fc7\u7a0b\uff0c\u9a8c\u8bc1\u4e86\u51e0\u79cd\u4f7f\u7528\u8f83\u4e3a\u666e\u904d\u7684\u514b\u670d\u968f\u673a\u5e72\u6270\u7684\u5355\u7247\u673a\u6570\u5b57\u6ee4\u6ce2\u7b97\u6cd5\uff0c\u5e76\u7ed9\u51fa\u4e86\u76f8\u5e94\u7684C\u7a0b\u5e8f\uff0c\u5c24\u5176\u5bf9\u4e2d\u4f4d\u503c\u6ee4\u6ce2\u548c\u4e2d\u4f4d\u503c\u5e73\u5747\u6ee4\u6ce2\u7b97\u6cd5\u7a0b\u5e8f\u8fdb\u884c\u4e86\u6539\u8fdb\u3002\u540c\u65f6\u4e5f\u5bf9\u8fd9\u51e0\u79cd\u6ee4\u6ce2\u7b97\u6cd5\u8fdb\u884c\u4e86\u6bd4\u8f83\uff0c\u5e76\u6307\u51fa\u4e86\u6bcf\u4e00\u79cd\u7b97\u6cd5\u7684\u5177\u4f53\u9002\u7528\u8303\u56f4\u548c\u6ce8\u610f\u4e8b\u9879\u3002\u53e6\u5916\u6211\u4eec\u4f7f\u7528\u4e86 prote<\/u>us\u8fdb\u884c\u4eff\u771f\u9a8c\u8bc1\u8fd9\u51e0\u79cd\u6ee4\u6ce2\u65b9\u6cd5\u3002\u53e6\u5916\u6211\u4eec\u8fd8\u4f7f\u7528\u4e86AD\u548cDA\u6765\u91c7\u96c6\u53ca\u8f93\u51fa\u6570\u636e\u3002<\/p>\n

\n\t
\n\t\"\u57fa\u4e8e\u5355\u7247\u673a\u548cC\u8bed\u8a00\u5bf9\u6570\u5b57\u6ee4\u6ce2\u7cfb\u7edf\u7684\u8bbe\u8ba1\"<\/p>\n

\n\t1 \u6570\u5b57\u6ee4\u6ce2\u8bbe\u8ba1\u539f\u7406<\/p>\n

\n\t\u8fd9\u91cc\u6709\u5f88\u591a\u79cd\u6570\u5b57\u6ee4\u6ce2\u65b9\u6cd5\uff0c\u6211\u4eec\u89c1\u9009\u7528\u5176\u4e2d\u51e0\u79cd\u6765\u8fdb\u884c\u8bbe\u8ba1\uff0c\u5982\u4e2d\u503c\u6ee4\u6ce2\u3001\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u3001\u52a0\u6743\u5e73\u5747\u6ee4\u6ce2\u7b49\u7b49\u3002\u6240\u4ee5\u4e0b\u9762\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5b83\u4eec\u3002<\/p>\n

\n\t1.1 \u4e2d\u503c\u6ee4\u6ce2<\/p>\n

\n\t\u4e2d\u4f4d\u503c\u6ee4\u6ce2\u662f\u5148\u5bf9\u67d0\u4e00\u53c2\u6570\u8fde\u7eed\u91c7\u6837N\u6b21\uff08\u4e00\u822cN\u53d6\u5947\u6570\uff09\uff0c\u7136\u540e\u628aN\u6b21\u91c7\u6837\u503c\u6309\u4ece\u5c0f\u5230\u5927\u6392\u5217\uff0c\u53d6\u4e2d\u95f4\u503c\u4e3a\u672c\u6b21\u91c7\u6837\u503c\u3002<\/p>\n

\n\t\u8be5\u6ee4\u6ce2\u65b9\u6cd5\u5b9e\u9645\u4e0a\u662f\u4e00\u79cd\u6392\u5e8f\u65b9\u6cd5\uff0c\u6211\u5728\u6b64\u91c7\u7528\u7684\u662f\u5192\u6ce1\u6cd5\u6392\u5e8f\u3002\u7531\u4e8e\u5728\u5192\u6ce1\u6cd5\u6392\u5e8f\u4e2d\uff0c\u6bcf\u51fa\u73b0\u4e00\u6b21\u524d\u8005\u6570\u636e\u5927\u4e8e\u540e\u8005\u6570\u636e\uff0c\u5c31\u8981\u8fdb\u884c\u4e8c\u8005\u6570\u636e\u7684\u4ea4\u6362\u3002<\/p>\n

\n\t\u8be5\u7b97\u6cd5\u7684\u6837\u4f8b\u5b50\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n

\n\t1 #define N 11 \/\/N\u503c\u53ef\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8c03\u6574<\/p>\n

\n\t3 char filter\uff08\uff09<\/p>\n

\n\t5 {<\/p>\n

\n\t7 char value_buf\uff3b\uff3d;<\/p>\n

\n\t9 char count\uff0ci\uff0cj\uff0ck\uff0ctemp;<\/p>\n

\n\t11 for\uff08count=0;count<\/p>\n

\n\t13 {<\/p>\n

\n\t14 value_buf\uff3bcount\uff3d=get_data\uff08\uff09;<\/p>\n

\n\t17 delay\uff08\uff09;<\/p>\n

\n\t18 }<\/p>\n

\n\t20 for\uff08i=0;i<\/p>\n

\n\t22 {<\/p>\n

\n\tk=i;<\/p>\n

\n\t24 for\uff08j=i+1;j<\/p>\n

\n\t26 if<\/u>\uff08value_buf\uff3bj\uff3d<\/p>\n

\n\t28 temp=value_buf\uff3bk\uff3d;<\/p>\n

\n\t30 value_buf\uff3bk\uff3d=value_buf\uff3bi\uff3d;<\/p>\n

\n\t32 value_buf\uff3bi\uff3d=temp;<\/p>\n

\n\t34 }<\/p>\n

\n\t36 return value_buf\uff3b\uff08N-1\uff09\/2\uff3d;<\/p>\n

\n\t37 }<\/p>\n

\n\t\u4f4d\u503c\u6ee4\u6ce2\u80fd\u6709\u6548\u5730\u514b\u670d\u5076\u7136\u56e0\u7d20\u5f15\u8d77\u7684\u6ce2\u52a8\u6216\u91c7\u6837\u5668\u4e0d\u7a33\u5b9a\u5f15\u8d77\u7684\u8bef\u7801\u7b49\u8109\u51b2\u5e72\u6270\u3002\u5bf9\u6e29\u5ea6\u3001\u6db2\u4f4d\u7b49\u7f13\u6162\u53d8\u5316\u7684\u88ab\u6d4b\u53c2\u6570\u91c7\u7528\u6b64\u7b97\u6cd5\u80fd\u6536\u5230\u826f\u597d\u7684\u6ee4\u6ce2\u6548\u679c\uff0c\u4f46\u5bf9\u4e8e\u6d41\u91cf\u3001\u538b\u529b\u7b49\u5feb\u901f\u53d8\u5316\u7684\u6570\u636e\uff0c\u4e0d\u5b9c\u91c7\u7528\u4e2d\u4f4d\u503c\u6ee4\u6ce2\u3002<\/p>\n

\n\t1.2 \u7b97\u672f\u5e73\u5747\u6ee4\u6ce2<\/p>\n

\n\t\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u6cd5\u9002\u7528\u4e8e\u5bf9\u4e00\u822c\u7684\u5177\u6709\u968f\u673a\u5e72\u6270\u7684\u4fe1\u53f7\u8fdb\u884c\u6ee4\u6ce2\u3002\u8fd9\u79cd\u4fe1\u53f7\u7684\u7279\u70b9\u662f\u4fe1\u53f7\u672c\u8eab\u5728\u67d0\u4e00\u6570\u503c\u8303\u56f4\u9644\u8fd1\u4e0a\u4e0b\u6ce2\u52a8\uff0c\u5982\u6d4b\u91cf<\/u>\u6d41\u91cf\u3001\u6db2\u4f4d\u65f6\u7ecf\u5e38\u9047\u5230\u8fd9\u79cd\u60c5\u51b5\u3002\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u6cd5\u662f\u8981\u6309\u8f93\u5165\u7684N \u4e2a\u91c7\u6837\u6570\u636e\uff0c\u5bfb\u627e\u8fd9\u6837\u4e00\u4e2aY\uff0c\u4f7f\u5f97Y \u4e0e\u5404\u4e2a\u91c7\u6837\u503c\u4e4b\u95f4\u7684\u504f\u5dee\u7684\u5e73\u65b9\u548c\u6700\u5c0f\u3002<\/p>\n

\n\t\u5177\u4f53\u5b9e\u73b0\u6b64\u7b97\u6cd5\u7684\u5b50\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n

\n\t1 #define N 12<\/p>\n

\n\t2 char filter\uff08\uff09<\/p>\n

\n\t5 {<\/p>\n

\n\t7 int count;<\/p>\n

\n\t9 int sum=0;<\/p>\n

\n\t10 for\uff08count=0;count<\/p>\n

\n\t13 {<\/p>\n

\n\t15 sum+=get_ad\uff08\uff09;<\/p>\n

\n\t16 delay\uff08\uff09;<\/p>\n

\n\t17 }<\/p>\n

\n\t18 return \uff08char\uff09\uff08sum\/N\uff09;<\/p>\n

\n\t19 }<\/p>\n

\n\t\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u9002\u7528\u4e8e\u5bf9\u4e00\u822c\u5177\u6709\u968f\u673a\u5e72\u6270\u7684\u4fe1\u53f7\u8fdb\u884c\u6ee4\u6ce2\u3002\u8fd9\u79cd\u4fe1\u53f7\u7684\u7279\u70b9\u662f\u6709\u4e00\u4e2a\u5e73\u5747\u503c\uff0c\u4fe1\u53f7\u5728\u67d0\u4e00\u6570\u503c\u8303\u56f4\u9644\u8fd1\u505a\u4e0a\u4e0b\u6ce2\u52a8\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u4ec5\u53d6\u4e00\u4e2a\u91c7\u6837\u503c\u505a\u4f9d\u636e\u663e\u7136\u662f\u4e0d\u51c6\u786e\u7684\u3002\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u5bf9\u4fe1\u53f7\u7684\u5e73\u6ed1\u7a0b\u5e8f\u5b8c\u5168\u53d6\u51b3\u4e8eN\uff0c\u5f53N\u8f83\u5927\u65f6\uff0c\u5e73\u6ed1\u5ea6\u9ad8\uff0c\u4f46\u7075\u654f\u5ea6\u4f4e\uff1b\u5f53N\u8f83\u5c0f\u65f6\uff0c\u5e73\u6ed1\u5ea6\u4f4e\uff0c\u4f46\u7075\u654f\u5ea6\u9ad8\uff0c\u5e94\u89c6\u5177\u4f53\u60c5\u51b5\u9009\u53d6N\uff0c\u4ee5\u4fbf\u65e2\u5c11\u5360\u7528\u8ba1\u7b97\u65f6\u95f4\uff0c\u53c8\u8fbe\u5230\u6700\u597d\u7684\u6548\u679c\u3002<\/p>\n

\n\t1.3 \u52a0\u6743\u5e73\u5747\u6ee4\u6ce2<\/p>\n

\n\t\u5728\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u548c\u79fb\u52a8\u5e73\u5747\u6ee4\u6ce2\u4e2d\uff0cN\u6b21\u91c7\u6837\u503c\u5728\u8f93\u51fa\u7ed3\u679c\u4e2d\u7684\u6743\u91cd\u662f\u5747\u7b49\u7684\uff0c\u53d61\/N\u3002\u7528\u8fd9\u6837\u7684\u6ee4\u6ce2\u7b97\u6cd5\uff0c\u5bf9\u4e8e\u65f6\u53d8\u4fe1\u53f7\u4f1a\u5f15\u5165\u6ede\u540e\uff0cN\u503c\u8d8a\u5927\uff0c\u6ede\u540e\u8d8a\u4e25\u91cd\u3002\u4e3a\u4e86\u589e\u52a0\u65b0\u91c7\u6837\u6570\u636e\u5728\u79fb\u52a8\u5e73\u5747\u4e2d\u7684\u6743\u91cd\uff0c\u4ee5\u63d0\u9ad8\u7cfb\u7edf\u5bf9\u5f53\u524d\u91c7\u6837\u503c\u4e2d\u6240\u53d7\u5e72\u6270\u7684\u7075\u654f\u5ea6\uff0c\u53ef\u91c7\u7528\u52a0\u6743\u5e73\u5747\u6ee4\u6ce2\uff0c\u5b83\u662f\u79fb\u52a8\u5e73\u5747\u6ee4\u6ce2\u7b97\u6cd5\u7684\u6539\u8fdb\u3002<\/p>\n

\n\t\u52a0\u6743\u5e73\u5747\u6ee4\u6ce2\u662f\u5bf9\u8fde\u7eedN\u6b21\u91c7\u6837\u503c\u5206\u522b\u4e58\u4e0a\u4e0d\u540c\u7684\u52a0\u6743\u7cfb\u7edf\u4e4b\u540e\u518d\u6c42\u7d2f\u52a0\u548c\uff0c\u52a0\u6743\u7cfb\u7edf\u4e00\u822c\u5148\u5c0f\u540e\u5927\uff0c\u4ee5\u7a81\u51fa\u540e\u9762\u82e5\u5e72\u91c7\u6837\u7684\u6548\u679c\uff0c\u52a0\u5f3a\u7cfb\u7edf\u5bf9\u53c2\u6570\u53d8\u5316\u8d8b\u52bf\u7684\u8fa8\u8bc6\u3002\u5404\u4e2a\u52a0\u6743\u7cfb\u7edf\u5747\u4e3a\u5c0f\u4e8e1\u7684\u5c0f\u6570\uff0c\u4e14\u6ee1\u8db3\u603b\u548c\u7b49\u4e8e1\u7684\u7ea6\u675f\u6761\u4ef6\u3002\u8fd9\u6837\uff0c\u52a0\u6743\u8fd0\u7b97\u4e4b\u540e\u7684\u7d2f\u52a0\u548c\u5373\u4e3a\u6709\u6548\u91c7\u6837\u503c\u3002<\/p>\n

\n\t\u4e3a\u65b9\u4fbf\u8ba1\u7b97\uff0c\u53ef\u53d6\u5404\u52a0\u6743\u7cfb\u6570\u5747\u4e3a\u6574\u6570\uff0c\u4e14\u603b\u548c\u4e3a256\uff0c\u52a0\u6743\u8fd0\u7b97\u540e\u7684\u7d2f\u52a0\u548c\u9664\u4ee5256\uff0c\u5373\u820d\u53bb\u4f4e\u5b57\u8282\u540e\u4fbf\u662f\u6709\u6548\u91c7\u6837\u503c\u3002\u5177\u4f53\u7684\u6837\u4f8b\u5b50\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n

\n\t1 \/\/code\u6570\u7ec4\u4e3a\u52a0\u6743\u7cfb\u7edf\u8868\uff0c\u5b58\u5728ROM<\/u>\u533a\u3002<\/p>\n

\n\t2 #define N 12<\/p>\n

\n\t3 char code jq\uff3bN\uff3d={1\uff0c2\uff0c3\uff0c4\uff0c5\uff0c6\uff0c7\uff0c8\uff0c9\uff0c10\uff0c11\uff0c12};<\/p>\n

\n\t4 char code sum_jp=1+2+3+4+5+6+7+8+9+10+11+12;<\/p>\n

\n\t5 char filter_5\uff08\uff09<\/p>\n

\n\t6 {<\/p>\n

\n\t7 char count;<\/p>\n

\n\t8 char value_buf\uff3bN\uff3d;<\/p>\n

\n\t9 int sum=0;<\/p>\n

\n\t10 for\uff08count=0;count<\/p>\n

\n\t11 {<\/p>\n

\n\t12 value_buf\uff3bcount\uff3d=get_data\uff08\uff09;<\/p>\n

\n\t13 delay\uff08\uff09;<\/p>\n

\n\t14 }<\/p>\n

\n\t15 for\uff08count=0;count<\/p>\n

\n\t16 sum+=value_buf\uff3bcount\uff3d*jq\uff3bcount\uff3d;<\/p>\n

\n\t17 return \uff08char\uff09\uff08sum\/sum_jq\uff09;<\/p>\n

\n\t18 }<\/p>\n

\n\t1.4 \u4e2d\u4f4d\u503c\u5e73\u5747\u6ee4\u6ce2<\/p>\n

\n\t\u5b83\u76f8\u5f53\u4e8e\u662f“\u4e2d\u4f4d\u503c\u6ee4\u6ce2\u6cd5”\u548c“\u7b97\u672f\u5e73\u5747\u6ee4\u6ce2\u6cd5”\u7684\u7ed3\u5408\u3002\u5b83\u8fde\u7eed\u91c7\u6837N\u4e2a\u6570\u636e\uff0c\u7136\u540e\u53bb\u6389\u4e00\u4e2a\u6700\u5927\u503c\u548c\u4e00\u4e2a\u6700\u5c0f\u503c\uff0c\u6700\u540e\u8ba1\u7b97N-2\u4e2a\u6570\u636e\u7684\u7b97\u672f\u5e73\u5747\u503c\u3002\u4e00\u822cN\u503c\u7684\u9009\u53d6\uff1a3-14\u3002<\/p>\n

\n\t\u5177\u4f53\u7b97\u6cd5\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n

\n\t1 #define N 12<\/p>\n

\n\t2 char filter\uff08\uff09<\/p>\n

\n\t3 {<\/p>\n

\n\t4 char count\uff0ci\uff0cj;<\/p>\n

\n\t5 char value_buf\uff3bN\uff3d;<\/p>\n

\n\t6 int sum=0;<\/p>\n

\n\t7 for \uff08count=0;count<\/p>\n

\n\t8 {<\/p>\n

\n\t9 value_buf\uff3bcount\uff3d = get_ad\uff08\uff09;<\/p>\n

\n\t10 delay\uff08\uff09;<\/p>\n

\n\t11 }<\/p>\n

\n\t12 for \uff08j=0;j<\/p>\n

\n\t13 {<\/p>\n

\n\t14 for \uff08i=0;i<\/p>\n

\n\t15 {<\/p>\n

\n\t16 if \uff08 value_buf\uff3bi\uff3d\u300bvalue_buf\uff3bi+1\uff3d \uff09<\/p>\n

\n\t17 {<\/p>\n

\n\t18 temp = value_buf\uff3bi\uff3d;<\/p>\n

\n\t19 value_buf\uff3bi\uff3d = value_buf\uff3bi+1\uff3d;<\/p>\n

\n\t20 value_buf\uff3bi+1\uff3d = temp;<\/p>\n

\n\t21 }<\/p>\n

\n\t22 }<\/p>\n

\n\t23 }<\/p>\n

\n\t24 for\uff08count=1;count<\/p>\n

\n\t25 sum += value\uff3bcount\uff3d;<\/p>\n

\n\t26 return \uff08char\uff09\uff08sum\/\uff08N-2\uff09\uff09;<\/p>\n

\n\t27 }<\/p>\n

\n\t\u8fd9\u79cd\u6ee4\u6ce2\u65b9\u6cd5\u517c\u5bb9\u4e86\u79fb\u52a8\u5e73\u5747\u6ee4\u6ce2\u7b97\u6cd5\u548c\u4e2d\u4f4d\u503c\u6ee4\u6ce2\u7b97\u6cd5\u7684\u4f18\u70b9\uff0c\u6240\u4ee5\u65e0\u8bba\u5bf9\u7f13\u6162\u53d8\u5316\u7684\u4fe1\u53f7\uff0c\u8fd8\u662f\u5bf9\u5feb\u901f\u53d8\u5316\u7684\u4fe1\u53f7\uff0c\u90fd\u80fd\u53d6\u5f97\u8f83\u597d\u7684\u6ee4\u6ce2\u6548\u679c\u3002<\/p>\n

\n\t1.5 \u9650\u5e45\u6ee4\u6ce2<\/p>\n

\n\t\u9650\u5e45\u6ee4\u6ce2\u7684\u57fa\u672c\u539f\u7406\u662f\u628a\u4e24\u6b21\u76f8\u90bb\u65f6\u523b\uff08n\u548cn-1\uff09\u7684\u91c7\u6837\u503cYn\u548cYn-1\u76f8\u51cf\uff0c\u6c42\u51fa\u5176\u5dee\u503c\uff0c\u4ee5\u7edd\u5bf9\u503c\u8868\u793a\uff0c\u7136\u540e\u5c06\u8fd9\u4e2a\u5dee\u503c\u4e0e\u4e24\u6b21\u91c7\u6837\u5141\u8bb8\u7684\u6700\u5927\u504f\u5dee\u503cΔY\u6bd4\u8f83\uff0c\u5982\u679c\u4e24\u6b21\u91c7\u6837\u503c\u7684\u5dee\u503c\u8d85\u8fc7\u4e86\u5141\u8bb8\u7684\u6700\u5927\u504f\u5dee\u503cΔY\uff0c\u5219\u8ba4\u4e3a\u53d1\u751f\u4e86\u968f\u673a\u5e72\u6270\uff0c\u5e76\u8ba4\u4e3a\u6700\u540e\u4e00\u6b21\u91c7\u6837\u503cYn\u975e\u6cd5\uff0c\u5e94\u4e88\u5254\u9664\u3002\u5254\u9664Yn\u540e\uff0c\u53ef\u7528Yn-1\u4ee3\u66ffYn\uff1b\u82e5\u672a\u8d85\u8fc7\u5141\u8bb8\u7684\u6700\u5927\u504f\u5dee\u503c\u8303\u56f4\uff0c\u5219\u8ba4\u4e3a\u672c\u6b21\u91c7\u6837\u503c\u6709\u6548\u3002\u53ef\u7528\u5982\u4e0b\u516c\u5f0f\u8868\u793a\uff1a<\/p>\n

\n\t|Yn-Yn-1|≤ΔY\uff1b\u5219Yn\u6709\u6548<\/p>\n

\n\t|Yn-Yn-1|\uff1eΔY\uff1b\u5219Yn-1\u6709\u6548<\/p>\n

\n\t\u6b64\u7b97\u6cd5\u7684\u6837\u4f8b\u5b50\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n

\n\t\u6b64\u7b97\u6cd5\u7684\u6837\u4f8b\u5b50\u7a0b\u5e8f\u5982\u4e0b\uff1a<\/p>\n

\n\t#define A 10 \/\/A\u503c\u53ef\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u8c03\u6574<\/p>\n

\n\tchar data; \/\/\u4e0a\u4e00\u6b21\u7684\u6570\u636e<\/p>\n

\n\tchar filter_1\uff08\uff09<\/p>\n

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

\n\tchar datanew; \/\/\u65b0\u6570\u636e\u53d8\u91cf<\/p>\n

\n\tdatanew=get_data\uff08\uff09; \/\/\u83b7\u5f97\u65b0\u6570\u636e<\/p>\n

\n\t\/\/\u6ee4\u6ce2\u7b97\u6cd5<\/p>\n

\n\tif \uff08\uff08datanew-data\u300bA\uff09||\uff08data-datanew\u300bA\uff09<\/p>\n

\n\treturn data;<\/p>\n

\n\treturn datanew;<\/p>\n

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

\n\t\u8be5\u7b97\u6cd5\u4e3b\u8981\u7528\u4e8e\u5904\u7406\u53d8\u5316\u6bd4\u8f83\u7f13\u6162\u7684\u6570\u636e\uff0c\u5982\u6e29\u5ea6\u3001\u7269\u4f53\u7684\u4f4d\u7f6e\u7b49\u3002\u4f7f\u7528\u65f6\u5173\u952e\u5728\u4e8e\u6700\u5927\u504f\u5dee\u503c\u7684Δy\u7684\u9009\u62e9\uff0c\u901a\u5e38\u53ef\u6839\u636e\u7ecf\u9a8c\u83b7\u5f97\uff0c\u4e5f\u53ef\u6309\u7167\u8f93\u51fa\u53c2\u6570\u53ef\u80fd\u7684\u6700\u5927\u53d8\u5316\u901f\u5ea6Vmax\u53ca\u91c7\u6837\u5468\u671fT\u6765\u51b3\u5b9aΔY\u7684\u503c\uff0c\u5373ΔY=VmaxT\u3002<\/p>\n

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

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

\n\t3 #define uchar unsigned char<\/p>\n

\n\t4 #define A 0.005<\/p>\n

\n\t5 #define N 11<\/p>\n

\n\t6 sbit con1 = P2^3;<\/p>\n

\n\t7 sbit con2 = P2^4;<\/p>\n

\n\t8 sbit con3 = P2^5;<\/p>\n

\n\t9 sbit con = P2^6;<\/p>\n

\n\t10 sbit OE = P2^0;<\/p>\n

\n\t11 sbit START = P2^1;<\/p>\n

\n\t12 sbit EOC = P2^2;<\/p>\n

\n\t13 uchar a;<\/p>\n

\n\t14 uchar buf\uff3bN\uff3d ={0};<\/p>\n

\n\t15 void change\uff08\uff09<\/p>\n

\n\t16 {<\/p>\n

\n\t17 int i;<\/p>\n

\n\t18 for\uff08i=0;i
\n\t\u6765\u6e90\uff1b21ic<\/p>\n","protected":false},"excerpt":{"rendered":"

\u6570\u636e\u91c7\u96c6 \uff0c\u53c8\u79f0\u6570\u636e\u83b7\u53d6\uff0c\u662f\u5229\u7528\u4e00\u79cd\u88c5\u7f6e\uff0c\u4ece\u7cfb\u7edf\u5916\u90e8\u91c7\u96c6\u6570\u636e\u5e76\u8f93\u5165\u5230\u7cfb\u7edf\u5185\u90e8\u7684\u4e00\u4e2a \u63a5\u53e3 \u3002\u6570\u636e\u91c7\u96c6\u6280\u672f\u5e7f\u6cdb\u5f15\u7528\u5728\u5404\u4e2a\u9886\u57df\u3002\u6bd4\u5982\u6444\u50cf\u5934\uff0c\u9ea6\u514b\u98ce\uff0c\u90fd\u662f\u6570\u636e\u91c7\u96c6\u5de5\u5177\u3002\u88ab\u91c7<\/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\/2828"}],"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=2828"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2828\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2828"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}