{"id":3195,"date":"2021-06-14T12:04:43","date_gmt":"2021-06-14T12:04:43","guid":{"rendered":""},"modified":"2021-06-14T20:06:59","modified_gmt":"2021-06-14T12:06:59","slug":"%e8%ae%a1%e7%ae%97%e6%9c%ba%e4%b8%8e%e5%8d%95%e7%89%87%e6%9c%ba%e7%9a%84%e4%b8%b2%e5%8f%a3%e9%80%9a%e4%bf%a1%e7%9a%84%e6%96%b9%e6%a1%88%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=3195","title":{"rendered":"\u8ba1\u7b97\u673a\u4e0e\u5355\u7247\u673a\u7684\u4e32\u53e3\u901a\u4fe1\u7684\u65b9\u6848\u8bbe\u8ba1"},"content":{"rendered":"

\n\t\u5728\u4ee5\u5355\u7247\u673a<\/u>\u4e3a\u57fa\u7840\u7684\u6570\u636e\u91c7\u96c6<\/u>\u548c\u5b9e\u65f6\u63a7\u5236\u7cfb\u7edf\u4e2d\uff0c\u901a\u8fc7\u8ba1\u7b97\u673a<\/u>\u4e2d\u7684RS<\/u>-232\u63a5\u53e3<\/u>\u8fdb\u884c\u8ba1\u7b97\u673a\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u547d\u4ee4\u548c\u6570\u636e\u4f20\u9001\uff0c\u5c31\u53ef\u4ee5\u5229\u7528\u8ba1\u7b97\u673a\u5bf9\u751f\u4ea7\u73b0\u573a\u8fdb\u884c\u76d1\u6d4b\u548c\u63a7\u5236\u3002\u7531\u4e8e\u8ba1\u7b97\u673a\u4e0a\u7684RS-232\u6240\u4f20\u9001\u7684\u8ddd\u79bb\u4e0d\u8d85\u8fc730m\uff0c\u6240\u4ee5\uff0c\u5728\u8fdc\u8ddd\u79bb\u7684\u6570\u636e\u4f20\u9001\u548c\u63a7\u5236\u65f6\uff0c\u53ef\u4ee5\u7528MAX485\u7684\u63a5\u53e3\u8f6c\u6362\u82af\u7247\u5c06RS-232\u8f6c\u6362\u6210RS-485<\/u>\u534f\u8bae\u8fdb\u884c\u8fdc\u8ddd\u79bb\u4f20\u9001\u3002\u5728\u53d1\u9001\u548c\u63a5\u6536\u7aef\u90fd\u8fdb\u884c\u534f\u8bae\u8f6c\u6362\u540e\uff0cRS-485\u534f\u8bae\u5bf9\u6570\u636e\u4f20\u9001\u6765\u8bf4\u662f\u76f8\u5bf9\u900f\u660e\u7684\uff0c\u6240\u4ee5\u4f9d\u7136\u53ef\u4ee5\u4f7f\u7528\u8ba1\u7b97\u673a\u4e2d\u7684RS-232\u8fdb\u884c\u8fdc\u8ddd\u79bb\u7684\u6570\u636e\u4f20\u9001\u548c\u63a7\u5236\u3002\u5728\u6700\u7b80\u5355\u7684RS-232\u76f4\u63a5\u4f20\u9001\u901a\u4fe1\u7cfb\u7edf\u4e2d\uff0c\u53ea\u8981\u53d1\u9001\u548c\u63a5\u6536\u53cc\u65b9\u540c\u65f6\u51c6\u5907\u597d\uff0c\u4ec5\u7528\u4fe1\u53f7\u53d1\u9001\u7aef\uff08TXD\uff09\uff0c\u4fe1\u53f7\u63a5\u6536\u7aef\uff08RXD\uff09\u548c\u4fe1\u53f7\u5730\uff08GND\uff093\u6839\u7ebf\u5373\u53ef\u8fdb\u884c\u901a\u4fe1\uff1b\u82e5\u4ee5\u5e94\u7b54\u65b9\u5f0f\u8fdb\u884c\u6570\u636e\u901a\u4fe1<\/u>\uff0c\u53ef\u4f7f\u7528\u8bf7\u6c42\u53d1\u9001\uff08RTS\uff09\u3001\u6e05\u9664\u53d1\u9001\uff08CTS\uff09\u6216\u6570\u636e\u7ec8\u7aef\u51c6\u5907\uff08DTR\uff09\u3001\u6570\u636e\u88c5\u7f6e\u51c6\u5907\uff08DSR\uff09\u8fdb\u884c\u786c\u4ef6\u63e1\u624b\u3002\u5728Windows95\u4e0b\uff0c\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u4f7f\u7528Win32\u901a\u4fe1API\u51fd\u6570\u6765\u5b9e\u73b0\u8fd9\u4e9b\u786c\u4ef6\u7684\u63e1\u624b\u4ee5\u53ca\u6570\u636e\u7684\u4f20\u9001\u3002\u572889C51\u5355\u7247\u673a\u7cfb\u7edf\u4e2d\uff0c\u5206\u522b\u4eceP3.0\u548cP3.1\u5f15\u51fa\u4e32\u53e3\u7ebfRXD\u548cTXD\u901a\u8fc7\u4e13\u7528\u7684\u7535\u5e73\u8f6c\u6362\u82af\u7247\u8f6c\u6362\u6210RS-232\u63a5\u53e3\u6807\u51c6\u7684\u7535\u5e73\uff0c\u8fd9\u6837\uff0c\u4e8c\u8005\u4e4b\u95f4\u5c31\u53ef\u4ee5\u901a\u8fc7RS-232\u63a5\u53e3\u8fdb\u884c\u6570\u5b57\u4fe1\u53f7\u7684\u4f20\u9001\u3002\u5355\u7247\u673a\u4e5f\u53ef\u4ee5\u4ee5\u76f4\u63a5\u4f20\u9001\u6216\u5e94\u7b54\u63e1\u624b\u7684\u65b9\u5f0f\u8fdb\u884c\u6570\u636e\u901a\u4fe1\uff0c\u4f46\u7531\u4e8e\u63e1\u624b\u65b9\u5f0f\u5360\u7528\u5176\u4ed6\u7684\u7aef\u53e3\uff0c\u800c\u5355\u7247\u673a\u7684\u7aef\u53e3\u6570\u91cf\u6709\u9650\uff0c\u6240\u4ee5\uff0c\u8ba1\u7b97\u673a\u4e0e\u5355\u7247\u673a\u7684\u901a\u4fe1\u5e38\u91c7\u7528\u76f4\u63a5\u4f20\u9001\u7684\u65b9\u5f0f\uff0c\u672c\u6587\u5c06\u91cd\u70b9\u4ecb\u7ecd\u3002<\/p>\n

\n\t1Windows95\u4e0b\u7684\u901a\u4fe1\u7f16\u7a0b<\/p>\n

\n\t <\/div>\n

\n\tWindows95\u901a\u4fe1\u4f53\u7cfb\u63d0\u4f9b\u4e861\u4e2a\u6539\u8fdb\u7684\u4e32\u884c\u5e94\u7528\u7a0b\u5e8f\u63a5\u53e3SAPI<\/u>\u7528\u6765\u8fdb\u884c\u4ea4\u4e92\u5f0f\u4e32\u884c\u901a\u4fe1\u3002\u5176\u4e2d\uff0c\u4e32\u53e3\u548c\u5176\u4ed6\u901a\u4fe1\u8bbe\u5907\u662f\u4f5c\u4e3a\u6587\u4ef6\u8fdb\u884c\u5904\u7406\u7684\uff0c\u4e32\u53e3\u7684\u6253\u5f00\u3001\u5173\u95ed\u3001\u8bfb\u53d6\u548c\u5199\u5165\u6240\u7528\u7684\u51fd\u6570\u548c\u64cd\u4f5c\u6587\u4ef6\u7684\u51fd\u6570\u76f8\u540c\u3002<\/p>\n

\n\t\u901a\u4fe1\u4f1a\u8bdd\u4ee5\u8c03\u7528CreateFile\u51fd\u6570\u5f00\u59cb\uff0cCreateFile\u51fd\u6570\u4e3a\u8bfb\u8bbf\u95ee\u6216\u5199\u8bbf\u95ee\u6253\u5f00\u4e32\u53e3\uff0c\u6253\u5f00\u6210\u529f\u540e\u8fd4\u56de\u8be5\u4e32\u53e3\u53e5\u67c4\uff0c\u4f9b\u8bfb\u5199\u4e32\u53e3\u65f6\u4f7f\u7528\u3002CreateFile\u51fd\u6570\u7684\u4f7f\u7528\u5982\u4e0b\uff1a<\/p>\n

\n\tCreateFile\uff08szDevice\uff0cfdwAccess\uff0cfdwShareMode\uff0clpsa\uff0cfdwCreate\uff0cfdwAttrsAndFlags\uff0chTe<\/u>mplateFile\uff09<\/p>\n

\n\t <\/p>\n

\n\t\u6253\u5f00\u4e32\u53e3\u540e\uff0c\u5728Windows95\u4e0b\u53ef\u4ee5\u5bf9\u4e32\u53e3\u8fdb\u884c\u5408\u9002\u7684\u914d\u7f6e\u3002Windows95\u63d0\u4f9b\u4e86COMMPROP\u7ed3\u6784\uff0cCOMMPROP\u7ed3\u6784\u4e2d\u5305\u542b\u4e86\u5bf9\u4e32\u53e3\u5141\u8bb8\u7684\u8bbe\u7f6e\uff0c\u5982\u6ce2\u7279\u7387\u3001\u6570\u636e\u4f4d\u6570\u3001\u505c\u6b62\u4f4d\u7684\u4e2a\u6570\u4ee5\u53ca\u5947\u5076\u6821\u9a8c\u65b9\u6cd5\u7b49\uff0c\u5982\u679c\u4e32\u53e3\u8fde\u63a5\u5230\u8c03\u5236\u89e3\u8c03\u5668\uff0cCOMMPROP\u7ed3\u6784\u4e2d\u8fd8\u5305\u542b\u8c03\u5236\u89e3\u8c03\u5668\u652f\u6301\u7684\u8bbe\u7f6e\u3002\u4f46COMMPROP\u7ed3\u6784\u7ed9\u51fa\u7684\u53ea\u662f\u5355\u7eaf\u7684\u4fe1\u606f\uff0c\u5b83\u4e0d\u80fd\u7528\u6765\u6539\u53d8\u4e32\u53e3\u7684\u8bbe\u7f6e\u3002Windows95\u4e0b\u4e32\u53e3\u8bbe\u7f6e\u7684\u6539\u53d8\u662f\u901a\u8fc7\u6539\u53d8\u5b83\u7684DCB\u7ed3\u6784\u6765\u5b9e\u73b0\u7684\uff0cDCB\u7ed3\u6784\u4e2d\u5305\u542b\u4e86\u6240\u6709\u4e32\u53e3\u7684\u8bbe\u7f6e\uff0c\u5176\u4e2d\u5305\u62ec\u786c\u4ef6\u7684\u63e1\u624b\u3001\u6d41\u63a7\u5236\u7b49\u3002<\/p>\n

\n\tWindows95\u63d0\u4f9bGetCommState\u51fd\u6570\u6765\u5f97\u5230\u5f53\u524d\u4e32\u53e3\u7684\u8bbe\u7f6e\u60c5\u51b5\uff0c\u8be5\u51fd\u6570\u63a5\u65361\u4e2a\u6253\u5f00\u7684\u7aef\u53e3\u53e5\u67c4\u548c1\u4e2a\u6307\u5411DCB\u7ed3\u6784\u7684\u6307\u9488\uff0c\u5728DCB\u7ed3\u6784\u4e2d\u8fd4\u56de\u4fe1\u606f\uff0cGetCommState\u51fd\u6570\u7684\u8865\u5145\u51fd\u6570\u662fSetCommState\u51fd\u6570\uff0cSetCommState\u51fd\u6570\u5c06DCB\u7ed3\u6784\u4e2d\u7684\u5185\u5bb9\u5199\u5411\u4e32\u53e3\u8bbe\u7f6e\uff0c\u8fd92\u4e2a\u51fd\u6570\u7684\u8c03\u7528\u5982\u4e0b\uff1a<\/p>\n

\n\tBOOLGetCommState\uff08hComm\uff0c&dcb\uff09<\/p>\n

\n\tBOOLSetCommState\uff08hComm\uff0c&dcb\uff09<\/p>\n

\n\t\u5176\u4e2d\uff0chComm\u4e3a\u6253\u5f00\u4e32\u53e3\u7684\u53e5\u67c4\uff0cdcb\u4e3a1\u4e2a\u6307\u5411DCB\u7684\u7ed3\u6784\u3002<\/p>\n

\n\tWindows95\u4e2d\u5b9e\u73b0\u4e32\u53e3\u7684\u8bfb\u5199\u51fd\u6570\u4e0e\u6587\u4ef6\u7684\u8bfb\u5199\u51fd\u6570\u76f8\u540c\uff0c\u8bfb\u5199\u51fd\u6570\u7684\u4f7f\u7528\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n

\n\tReadFile\uff08hComm\uff0cinbuff\uff0cnBytes\uff0c&nBytesRead\uff0c&overlapped\uff09<\/p>\n

\n\tWriteFile\uff08hComm\uff0coutbuff\uff0cnBytes\uff0c&nBytesWrite\uff0c&overlapped\uff09<\/p>\n

\n\t\u5176\u4e2d\uff0c\u7b2c1\u4e2a\u53c2\u6570\u662f\u6253\u5f00\u4e32\u53e3\u7684\u53e5\u67c4\uff0c\u7b2c2\u4e2a\u53c2\u6570\u662f\u6570\u636e\u6240\u4f7f\u7528\u7684\u7f13\u51b2\u533a\uff0c\u7b2c3\u4e2a\u53c2\u6570\u662f\u8981\u8bfb\u53d6\u7684\u5b57\u8282\u6570\uff0c\u7b2c4\u4e2a\u53c2\u6570\u662f\u5b9e\u9645\u8bfb\u53d6\u7684\u5b57\u8282\u6570\uff0c\u5b9e\u9645\u8bfb\u53d6\u7684\u5b57\u8282\u6570\u53ef\u80fd\u5c0f\u4e8e\u8981\u8bfb\u53d6\u7684\u5b57\u8282\u6570\uff0c\u6700\u540e1\u4e2a\u53c2\u6570\u6307\u54111\u4e2a\u8986\u76d6\u4f3c\u7684\u7ed3\u6784\uff0c\u5f53CreateFile\u4e2ddwAttrsAndFlags\u53c2\u6570\u8bbe\u7f6e\u4e3aFILEFLAGOVERLAPPED\u65f6\uff0c\u6b64\u53c2\u6570\u53ef\u4ee5\u6307\u5b9a1\u4e2aOVERLAPPED\u7ed3\u6784\uff0c\u4f7f\u6570\u636e\u7684\u8bfb\u5199\u64cd\u4f5c\u5728\u540e\u53f0\u8fdb\u884c\u3002<\/p>\n

\n\t\u8bfb\u5199\u7aef\u53e3\u53ef\u4ee5\u901a\u8fc74\u79cd\u6280\u672f\u6765\u5b9e\u73b0\uff1a\u67e5\u8be2\u3001\u540c\u6b65I\/O\u3001\u5f02\u6b65I\/O\uff08\u540e\u53f0I\/O\uff09\u548c\u4e8b\u4ef6\u9a71\u52a8I\/O\u3002\u67e5\u8be2\u65b9\u5f0f\u76f4\u63a5\u3001\u6613\u4e8e\u7406\u89e3\uff0c\u4f46\u5360\u7528\u5927\u91cfCPU<\/u>\u65f6\u95f4\uff1b\u540c\u6b65I\/O\u76f4\u5230\u8bfb\u53d6\u6240\u6307\u5b9a\u5b57\u8282\u6570\u6216\u8d85\u65f6\u65f6\u624d\u8fd4\u56de\uff0c\u8fd9\u6837\u5f88\u5bb9\u6613\u957f\u65f6\u95f4\u5730\u963b\u585e\u7ebf\u7a0b\uff1b\u5f02\u6b65I\/O\u53ef\u4ee5\u5728\u540e\u53f0\u8bfb\u5199\u6570\u636e\uff0c\u800c\u5728\u524d\u53f0\u505a\u5176\u4ed6\u7684\u4e8b\u60c5\uff1b\u4e8b\u4ef6\u9a71\u52a8I\/O\u662f\u7531Windows95\u901a\u77e5\u5e94\u7528\u7a0b\u5e8f\u67d0\u4e9b\u4e8b\u4ef6\u4ec0\u4e48\u65f6\u5019\u53d1\u751f\uff0c\u7136\u540e\u6839\u636e\u6240\u53d1\u751f\u7684\u4e8b\u60c5\u6765\u5bf9\u4e32\u53e3\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n

\n\t\u8fd94\u79cd\u4e0d\u540c\u7684\u6280\u672f\uff0c\u5404\u6709\u5229\u5f0a\u548c\u81ea\u5df1\u9002\u7528\u7684\u9886\u57df\uff0c\u6240\u4ee5\uff0c\u5728\u4e0d\u540c\u7684\u901a\u4fe1\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u8981\u6c42\u91c7\u7528\u4e0d\u540c\u7684\u6280\u672f\u3002\u5728\u76d1\u6d4b\u7cfb\u7edf\u4e2d\uff0c\u7531\u4e8e\u4e8b\u4ef6\u7684\u5076\u7136\u6027\u548c\u8981\u6c42\u4f20\u9001\u7684\u5b9e\u65f6\u6027\uff0c\u8ba1\u7b97\u673a\u5e38\u91c7\u7528\u4e8b\u4ef6\u9a71\u52a8I\/O\u65b9\u5f0f\u6765\u8fdb\u884c\u73b0\u573a\u76d1\u6d4b\u3002<\/p>\n

\n\t\u5728\u4e8b\u4ef6\u9a71\u52a8I\/O\u65b9\u5f0f\u4e0b\uff0cWindows95\u62a5\u544a\u7ed9\u5e94\u7528\u7a0b\u5e8f\u7684\u4e8b\u4ef6\u7531\u51fd\u6570GetCommMask\u8fd4\u56de\uff0c\u6539\u53d8\u8fd4\u56de\u7684\u4e8b\u4ef6\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528SetCommMask\u51fd\u6570\u8bbe\u7f6e\uff0c\u8fd92\u4e2a\u51fd\u6570\u7684\u8c03\u7528\u5982\u4e0b\uff1a<\/p>\n

\n\tGetCommMask\uff08hComm\uff0c&dwMask\uff09<\/p>\n

\n\tSetCommMask\uff08hComm\uff0cdwMask\uff09<\/p>\n

\n\t\u7b2c1\u4e2a\u53c2\u6570\u662f\u6253\u5f00\u4e32\u53e3\u7684\u53e5\u67c4\uff0c\u7b2c2\u4e2a\u53c2\u6570\u662f\u8981\u7b49\u5f85\u76841\u4e2a\u6216\u591a\u4e2a\u4e8b\u4ef6\u7684\u63a9\u7801\u3002\u5728\u7528SetCommMask\u8bbe\u7f6e\u4e86\u6709\u7528\u7684\u4e8b\u4ef6\u540e\uff0c\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528Wai<\/u>tCommEvent\u51fd\u6570\u6765\u7b49\u5f85\u4e8b\u4ef6\u7684\u53d1\u751f\uff0c\u76f4\u5230\u4e8b\u4ef6\u53d1\u751f\uff0cWaitCommEvent\u51fd\u6570\u8fd4\u56de\u3002WaitCommEvent\u51fd\u6570\u4f7f\u7528\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n

\n\tWaitCommEvent\uff08hComm\uff0c&dwEvent\uff0c&overlapped\uff09<\/p>\n

\n\t\u7b2c1\u4e2a\u53c2\u6570\u662f\u6253\u5f00\u4e32\u53e3\u7684\u53e5\u67c4\uff0c\u7b2c2\u4e2a\u53c2\u6570\u662f\u8fd4\u56de\u7684\u4e8b\u4ef6\uff0c\u7b2c3\u4e2a\u53c2\u6570\u662f\u6307\u5b9a\u540c\u6b65\u6216\u8005\u5f02\u6b65\u64cd\u4f5c\u3002\u5f53\u51fd\u6570\u8fd4\u56de\u540e\uff0c\u53ef\u6839\u636e\u8fd4\u56de\u7684\u4e8b\u4ef6\u63a9\u7801\u8fdb\u884c\u76f8\u5e94\u7684\u4e32\u53e3\u64cd\u4f5c\u3002<\/p>\n

\n\t\u5b8c\u6210\u901a\u4fe1\u540e\uff0c\u4e32\u53e3\u5e94\u8be5\u5173\u95ed\uff0c\u5426\u5219\uff0c\u5b83\u59cb\u7ec8\u5904\u4e8e\u6253\u5f00\u72b6\u6001\uff0c\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u5c31\u4e0d\u80fd\u6253\u5f00\u6216\u4f7f\u7528\u5b83\u3002\u5173\u95ed\u4e32\u53e3\u7684\u51fd\u6570\u4e3a\uff1aCloseHandle\uff08hComm\uff09\uff0c\u5176\u4e2d\uff0chComm\u4e3a\u6253\u5f00\u7684\u4e32\u53e3\u53e5\u67c4\u3002<\/p>\n

\n\t2\u5355\u7247\u673a\u4e0b\u7684\u901a\u4fe1\u7f16\u7a0b<\/p>\n

\n\t\u5355\u7247\u673a89C51\u7684\u4e32\u884c\u7aef\u53e3\u67094\u79cd\u5de5\u4f5c\u65b9\u5f0f\uff0c\u901a\u8fc7\u7f16\u7a0b\u8bbe\u8ba1\uff0c\u53ef\u4ee5\u4f7f\u5176\u5de5\u4f5c\u5728\u4efb\u4e00\u65b9\u5f0f\uff0c\u4ee5\u6ee1\u8db3\u4e0d\u540c\u573a\u5408\u7684\u9700\u8981\u3002\u5176\u4e2d\uff0c\u65b9\u5f0f0\u4e3b\u8981\u7528\u4e8e\u5916\u63a5\u79fb\u4f4d\u5bc4\u5b58\u5668<\/u>\uff0c\u4ee5\u6269\u5c55\u5355\u7247\u673a\u7684I\/O\u7535\u8def<\/u>\uff1b\u65b9\u5f0f1\u4e3b\u8981\u7528\u4e8e\u53cc\u673a\u4e4b\u95f4\u6216\u5916\u8bbe\u7535\u8def\u7684\u901a\u4fe1\uff1b\u65b9\u5f0f2\u30013\u9664\u6709\u65b9\u5f0f1\u7684\u529f\u80fd\u5916\uff0c\u8fd8\u53ef\u7528\u4f5c\u591a\u673a\u901a\u4fe1\uff0c\u4ee5\u6784\u6210\u591a\u5fae\u673a\u7cfb\u7edf\uff0c\u65b9\u5f0f2\u30013\u7684\u533a\u522b\u5728\u4e8e\u6ce2\u7279\u7387\u7684\u4e0d\u540c\u3002<\/p>\n

\n\t\u5355\u7247\u673a\u7684\u4e32\u884c\u901a\u4fe1\u7684\u6ce2\u7279\u7387\u53ef\u4ee5\u7a0b\u63a7\u8bbe\u5b9a\uff0c\u5728\u4e0d\u540c\u7684\u5de5\u4f5c\u65b9\u5f0f\u4e0b\uff0c\u7531\u65f6\u949f<\/u>\u632f\u8361\u9891\u7387\u7684\u5206\u9891\u503c\u6216\u7531\u5b9a\u65f6\u5668<\/u>T1\u7684\u5b9a\u65f6\u6ea2\u51fa\u65f6\u95f4\u786e\u5b9a\u3002<\/p>\n

\n\t\u5355\u7247\u673a\u7684\u4e32\u884c\u7aef\u53e3\u67092\u4e2a\u63a7\u5236\u5bc4\u5b58\u5668\uff0c\u7528\u6765\u8bbe\u7f6e\u5de5\u4f5c\u65b9\u5f0f\u3001\u53d1\u9001\u6216\u63a5\u6536\u7684\u72b6\u6001\u3001\u7279\u5f81\u4f4d\u3001\u6570\u636e\u4f20\u9001\u7684\u6ce2\u7279\u7387\u4ee5\u53ca\u4e2d\u65ad\u6807\u5fd7TI<\/u>\u548cRI\u3002<\/p>\n

\n\t\u5355\u7247\u673a\u7684\u4e32\u884c\u7aef\u53e3\u67091\u4e2a\u6570\u636e\u5bc4\u5b58\u5668SBUF\uff0c\u8be5\u5bc4\u5b58\u5668\u4e3a\u53d1\u9001\u548c\u63a5\u6536\u6240\u5171\u6709\uff0c\u5728\u4e00\u5b9a\u6761\u4ef6\u4e0b\uff0c\u5411SBUF\u5199\u5165\u6570\u636e\u5c31\u542f\u52a8\u4e86\u53d1\u9001\u8fc7\u7a0b\uff0c\u8bfbSBUF\u5c31\u542f\u52a8\u4e86\u63a5\u6536\u8fc7\u7a0b\u3002<\/p>\n

\n\t\u5355\u7247\u673a\u53ef\u4ee5\u91c7\u7528\u5faa\u73af\u65b9\u5f0f\u6216\u4e2d\u65ad\u65b9\u5f0f\u5b9e\u73b0\u4e32\u884c\u6570\u636e\u7684\u4f20\u9001\u3002\u5728\u5faa\u73af\u65b9\u5f0f\u4e0b\uff0c\u5355\u7247\u673a\u5faa\u73af\u5bf9\u6570\u636e\u5bc4\u5b58\u5668SBUF\u8fdb\u884c\u8bfb\u5199\u6765\u5b9e\u73b0\u6570\u636e\u7684\u63a5\u6536\u548c\u53d1\u9001\uff1b\u5728\u4e2d\u65ad\u65b9\u5f0f\u4e0b\uff0c\u5bf9\u65b9\u5f0f1\u30012\u6765\u8bf4\uff0c1\u5e27\u6570\u636e\u53d1\u9001\u6216\u63a5\u6536\u5b8c\u540e\uff0cTI\/RI\u81ea\u52a8\u7f6e1\uff0c\u8bf7\u6c42\u4e32\u884c\u4e2d\u65ad\uff0c\u82e5CPU\u54cd\u5e94\u4e2d\u65ad\uff0c\u5219\u6267\u884c\u4e32\u884c\u4e2d\u65ad\u670d\u52a1\u7a0b\u5e8f\uff0c\u5e76\u628aTI\/RI\u6e050\u4ee5\u518d\u6b21\u54cd\u5e94\u4e2d\u65ad\u3002\u5bf9\u5728\u65b9\u5f0f2\u30013\u4e0b\u7684\u63a5\u6536\uff0c\u8fd8\u8981\u89c6\u4e32\u53e3\u63a7\u5236\u5bc4\u5b58\u5668SCON\u7684\u8bbe\u7f6e\u624d\u53ef\u786e\u5b9aRI\u662f\u5426\u88ab\u7f6e\u4f4d\u4ee5\u53ca\u4e32\u53e3\u4e2d\u65ad\u662f\u5426\u5f00\u653e\u3002<\/p>\n

\n\t\u5b9e\u65f6\u63a7\u5236\u4e2d\uff0c\u7531\u4e8e\u4e8b\u4ef6\u7684\u7a81\u53d1\u6027\uff0c\u5e38\u91c7\u7528\u4e2d\u65ad\u7684\u65b9\u5f0f\u8fdb\u884c\u6570\u636e\u4f20\u9001\uff0c\u4e2d\u65ad\u65b9\u5f0f\u80fd\u66f4\u5927\u9650\u5ea6\u5730\u63d0\u9ad8\u8d44\u6e90\u7684\u5229\u7528\u7387\uff0c\u4f7fCPU\u5728\u4e0d\u8fdb\u884c\u6570\u636e\u901a\u4fe1\u65f6\u505a\u5176\u4ed6\u7684\u5de5\u4f5c\u3002\u4e0b\u9762\u91cd\u70b9\u4ecb\u7ecd\u5355\u7247\u673a\u5728\u65b9\u5f0f1\u4e0b\u7684\u4e2d\u65ad\u65b9\u5f0f\u7f16\u7a0b\u3002<\/p>\n

\n\t\u65b9\u5f0f1\u662f10\u4f4d\u5f02\u6b65\u901a\u4fe1\u65b9\u5f0f\uff0c\u5176\u4e2d\u5305\u62ec1\u4e2a\u8d77\u59cb\u4f4d\uff0c8\u4e2a\u6570\u636e\u4f4d\u548c1\u4e2a\u505c\u6b62\u4f4d\u3002\u6ce2\u7279\u7387\u7531\u5b9a\u65f6\u5668T1\u7684\u6ea2\u51fa\u7387\u548c\u4e32\u53e3\u63a7\u5236\u5bc4\u5b58\u5668SMOD\u7684\u72b6\u6001\u786e\u5b9a\uff0c\u5728CPU\u7684\u6676\u632f<\/u>\u4e3a11.0592MHz\u65f6\uff0c\u6ce2\u7279\u7387\u5e38\u91c7\u75289600b\/s\u3002<\/p>\n

\n\t\u5bf9SBUF\u8fdb\u884c\u5199\u64cd\u4f5c\u5c31\u53ef\u542f\u52a8\u53d1\u9001\uff0c\u5728\u53d1\u9001\u79fb\u4f4d\u65f6\u949f\u7684\u540c\u6b65\u4e0b\uff0c\u4eceTXD\u5148\u9001\u51fa\u8d77\u59cb\u4f4d\uff0c\u7136\u540e\u662f8\u4f4d\u6570\u636e\u4f4d\uff0c\u6700\u540e\u662f\u505c\u6b62\u4f4d\uff0c\u8fd9\u6837\uff0c1\u5e27\u6570\u636e\u53d1\u9001\u5b8c\uff0c\u4e2d\u65ad\u6807\u5fd7TI\u7f6e\u4f4d\u3002<\/p>\n

\n\t\u5728\u5141\u8bb8\u63a5\u6536\u7684\u6761\u4ef6\u4e0b\uff08REN\uff1d1\uff09\uff0c\u5f53RXD\u51fa\u73b0\u75311\u52300\u7684\u8d1f\u8df3\u53d8\u65f6\uff0c\u5373\u88ab\u5f53\u6210\u662f\u4e32\u884c\u53d1\u9001\u6765\u76841\u5e27\u6570\u636e\u7684\u8d77\u59cb\u4f4d\uff0c\u4ece\u800c\u542f\u52a81\u6b21\u63a5\u6536\u8fc7\u7a0b\u3002\u5f538\u4f4d\u6570\u636e\u63a5\u6536\u5b8c\uff0c\u5e76\u68c0\u6d4b\u5230\u9ad8\u7535\u5e73\u505c\u6b62\u4f4d\u540e\uff0c\u5373\u628a\u6536\u5230\u76848\u4f4d\u6570\u636e\u88c5\u5165SBUF\uff0c\u7f6e\u4f4dRI\uff0c1\u5e27\u6570\u636e\u7684\u63a5\u6536\u8fc7\u7a0b\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n

\n\t\u4e0b\u9762\u662f\u5355\u7247\u673a\u4ee5\u65b9\u5f0f1\u5728\u76f4\u63a5\u4f20\u9001\u4e0b\u7684\u4e2d\u65ad\u63a5\u6536\u548c\u53d1\u9001\u7a0b\u5e8f\u3002\u7531\u4e8e\u6ca1\u6709\u4f7f\u7528\u901a\u4fe1\u63e1\u624b\uff0c\u6240\u4ee5\u901a\u4fe1\u53cc\u65b9\u90fd\u5e94\u505a\u597d\u901a\u4fe1\u51c6\u5907\u3002\u5728\u8ba1\u7b97\u673a\u63a5\u6536\u3001\u5355\u7247\u673a\u53d1\u9001\u65f6\uff0c\u7531\u8ba1\u7b97\u673a\u5148\u53d1\u9001\u5b57\u6bcd“R”\uff0c\u901a\u77e5\u5355\u7247\u673a\u8ba1\u7b97\u673a\u5df2\u51c6\u5907\u597d\uff0c\u7136\u540e\u8ba1\u7b97\u673a\u5728\u4e8b\u4ef6\u9a71\u52a8I\/O\u65b9\u5f0f\u4e0b\u7b49\u5f85\u63a5\u6536\u5230\u5b57\u7b26<\/u>“Y”\uff1b\u5f53\u5355\u7247\u673a\u63a5\u6536\u5230“R”\u65f6\uff0c\u5411\u8ba1\u7b97\u673a\u53d1\u9001“Y”\uff0c\u8868\u793a\u5355\u7247\u673a\u4e5f\u5df2\u51c6\u5907\u597d\uff0c\u8fd9\u6837\uff0c\u4e00\u65e6\u8ba1\u7b97\u673a\u63a5\u6536\u5230“Y”\u5c31\u8868\u793a\u53cc\u65b9\u90fd\u5df2\u51c6\u5907\u597d\uff0c\u4e8c\u8005\u4e4b\u95f4\u5c31\u53ef\u4ee5\u8fdb\u884c\u6570\u636e\u4ea4\u6362\u4e86\u3002\u5728\u8ba1\u7b97\u673a\u53d1\u9001\u3001\u5355\u7247\u673a\u63a5\u6536\u65f6\uff0c\u8ba1\u7b97\u673a\u53d1\u90011\u5e27\u6570\u636e\uff0c\u5355\u7247\u673a\u54cd\u5e94\u4e2d\u65ad\uff0c\u63a5\u6536\u6570\u636e\u3002\u5355\u7247\u673a\u7a0b\u5e8f\u7684\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n

\n\t\"\"<\/p>\n

\n\t3\u7ed3\u675f\u8bed<\/p>\n

\n\t\u4e32\u53e3\u901a\u4fe1\u662f\u4e00\u79cd\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5404\u4e2a\u9886\u57df\u7684\u901a\u4fe1\u65b9\u5f0f\uff0c\u7531\u4e8e\u76ee\u524d\u5927\u90e8\u5206\u8ba1\u7b97\u673a\u90fd\u5b89\u88c5\u4e86Windows95\u64cd\u4f5c\u7cfb\u7edf\uff0c\u6240\u4ee5\u672c\u6587\u5177\u4f53\u5b9e\u73b0\u4e86\u5728Windows95\u4e0b\u5229\u7528\u5b83\u7684SDK\u51fd\u6570\u6765\u4e0e\u5355\u7247\u673a\u8fdb\u884c\u4e32\u53e3\u901a\u4fe1\u3002\u672c\u6587\u6240\u63d0\u51fa\u7684\u5b9e\u73b0\u51fd\u6570\u5728\u6240\u6709\u5f53\u524d\u6d41\u884c\u8f6f\u4ef6\u5982VC++\u3001Delphi\u7b49\u4e2d\u90fd\u53ef\u5b9e\u73b0\u3002\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u7528\u4e8e\u8fd1\u8ddd\u79bb\u7684RS-232\u901a\u4fe1\uff0c\u800c\u4e14\uff0c\u8fd8\u53ef\u4ee5\u5b9e\u73b0\u4e2d\u8fdc\u8ddd\u79bbRS-485\u901a\u4fe1\u3002\u5728\u4f7f\u7528\u8be5\u7a0b\u5e8f\u7684\u901a\u4fe1\u7cfb\u7edf\u4e2d\uff0c\u8fd1\u8fdc\u8ddd\u79bb\u7684\u901a\u4fe1\u90fd\u53d6\u5f97\u826f\u597d\u7684\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u4ee5 \u5355\u7247\u673a \u4e3a\u57fa\u7840\u7684 \u6570\u636e\u91c7\u96c6 \u548c\u5b9e\u65f6\u63a7\u5236\u7cfb\u7edf\u4e2d\uff0c\u901a\u8fc7 \u8ba1\u7b97\u673a \u4e2d\u7684 RS -232 \u63a5\u53e3 \u8fdb\u884c\u8ba1\u7b97\u673a\u4e0e\u5355\u7247\u673a\u4e4b\u95f4\u7684\u547d\u4ee4\u548c\u6570\u636e\u4f20\u9001\uff0c\u5c31\u53ef\u4ee5\u5229\u7528\u8ba1\u7b97\u673a\u5bf9\u751f\u4ea7\u73b0\u573a\u8fdb\u884c\u76d1\u6d4b\u548c\u63a7\u5236\u3002\u7531\u4e8e\u8ba1\u7b97<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/3195"}],"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=3195"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/3195\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3195"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}