{"id":2126,"date":"2019-01-24T06:29:10","date_gmt":"2019-01-24T06:29:10","guid":{"rendered":""},"modified":"2019-01-24T14:29:36","modified_gmt":"2019-01-24T06:29:36","slug":"dsp%e7%9a%84%e4%b8%b2%e8%a1%8c%e9%80%9a%e4%bf%a1%e6%8e%a5%e5%8f%a3sci%e4%b8%8epc%e6%9c%ba%e7%9a%84%e9%80%9a%e8%ae%af%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=2126","title":{"rendered":"DSP\u7684\u4e32\u884c\u901a\u4fe1\u63a5\u53e3SCI\u4e0ePC\u673a\u7684\u901a\u8baf\u8bbe\u8ba1"},"content":{"rendered":"
\n\t1 \u5f15\u8a00<\/p>\n
\n\tDSP<\/u> \u65e2\u662fDigital Signal Pricessing \u7684\u7f29\u5199\uff0c\u4e5f\u662fDigital Signal Pricessor \u7684\u7f29\u5199\u3002\u524d\u8005\u662f\u6307\u6570\u5b57\u4fe1\u53f7\u5904\u7406\u7684\u7406\u8bba\u548c\u65b9\u6cd5\uff0c\u540e\u8005\u5219\u662f\u6307\u7528\u4e8e\u6570\u5b57\u4fe1\u53f7\u5904\u7406\u7684\u53ef\u7f16\u7a0b\u5fae\u5904\u7406\u5668\u3002TMS320F240 \u7cfb\u5217\u662f\u5728TMS320F2000TM \u5e73\u53f0\u4e0b\u7684\u4e00\u79cd\u5b9a\u70b9DSP \u82af\u7247\uff0c\u662f\u4e13\u4e3a\u6570\u5b57\u7535\u673a\u63a7\u5236\u548c\u5176\u4ed6\u63a7\u5236\u5e94\u7528\u7cfb\u7edf\u800c\u8bbe\u8ba1\u768416\u4f4d\u5b9a\u70b9\u8fd0\u7b97\u7684DSP\u3002\u5b83\u96c6\u5408\u4e86DSP \u7684\u9ad8\u901f\u8fd0\u7b97\u529f\u80fd\u4e0e\u7535\u673a\u7684\u5f3a\u5927\u63a7\u5236\u80fd\u529b\uff0c\u4e3a\u63a7\u5236\u7cfb\u7edf\u5e94\u7528\u63d0\u4f9b\u4e86\u4e00\u79cd\u7406\u60f3\u7684\u89e3\u51b3\u65b9\u6848\u3002TMS320F240 \u7247\u5185\u5916\u8bbe\u6709\u4e00\u4e2a16 \u4f4d\u7684\u540c\u6b65\u4e32\u884c\u5916\u56f4\u63a5\u53e3\uff08SPI<\/u>\uff09\uff0c\u4e00\u4e2a\u7528\u4e8e\u4e32\u884c\u901a\u8baf\u63a5\u53e3\u7684SCI \u6a21\u5757\uff0c\u53cc10 \u4f4dA\/D \u8f6c\u6362\u5668\uff0c\u5e26\u4e2d\u65ad\u7684\u770b\u95e8\u72d7<\/u>\u5b9a\u65f6\u5668<\/u>\u6a21\u5757\uff08WDT\uff09\uff0c\u5e26\u6709\u9501\u76f8\u73af\uff08PLL\uff09\u65f6\u949f\u53d1\u751f\u5668<\/u>\u3002\u53e6\u5916\uff0c\u8fd8\u96c6\u6210\u4e86\u4e24\u4e2a\u4e8b\u4ef6\u7ba1\u7406\u6a21\u5757EVA \u548cEVB\u3002\u56e0\u6b64\uff0cTMS320F240 \u4e0d\u4ec5\u5177\u6709\u9ad8\u901f\u6570\u636e\u5904\u7406\u80fd\u529b\uff0c\u8fd8\u5177\u6709\u63a7\u5236\u548c\u4e8b\u4ef6\u7ba1\u7406\u80fd\u529b\uff0c\u53ef\u5b8c\u6210\u4eba\u673a\u754c\u9762\u3001\u4e0e\u4e0a\u4f4d\u673a\u8fdb\u884c\u4e32\u884c\u901a\u4fe1\u7b49\u529f\u80fd\u3002<\/p>\n \n\t2 \u4e32\u884c\u901a\u8baf\u63a5\u53e3\uff08SCI\uff09\u6a21\u5757<\/p>\n \n\tSCI \u63a5\u6536\u5668\u548c\u53d1\u9001\u5668\u662f\u53cc\u7f13\u51b2\u7684\uff0c\u6bcf\u4e00\u4e2a\u90fd\u6709\u4ed6\u81ea\u5df1\u5355\u72ec\u7684\u4f7f\u80fd\u548c\u4e2d\u65ad\u6807\u5fd7\u4f4d\u3002\u4e24\u8005\u53ef\u5355\u72ec\u5de5\u4f5c\uff0c\u6216\u5728\u5168\u53cc\u5de5\u7684\u65b9\u5f0f\u4e0b\u540c\u65f6\u5de5\u4f5c\u3002\u4e3a\u4e86\u786e\u4fdd\u6570\u636e\u7684\u5b8c\u6574\u6027\uff0cSCI \u5bf9\u63a5\u6536\u5230\u7684\u6570\u636e\u8fdb\u884c\u95f4\u65ad\u68c0\u6d4b\u3001\u5947\u5076\u6027\u6821\u9a8c\u3001\u8d85\u65f6\u548c\u5e27\u51fa\u9519\u7684\u68c0\u67e5\u3002\u901a\u8fc7\u4e00\u4e2a16 \u4f4d\u7684\u6ce2\u7279\u7387\u9009\u62e9\u5bc4\u5b58\u5668<\/u>\uff0c\u6570\u636e\u4f20\u8f93\u7684\u901f\u5ea6\u53ef\u4ee5\u88ab\u7f16\u7a0b\u4e3a65535\u591a\u79cd\u4e0d\u540c\u7684\u65b9\u5f0f\u3002SCI \u7684\u4e32\u884c\u901a\u4fe1\u63a5\u53e3\u5305\u62ecSCIRXD\uff08\u4e32\u884c\u901a\u4fe1\u6570\u636e\u63a5\u6536\uff09\u548cSCITXD\uff08\u4e32\u884c\u901a\u4fe1\u6570\u636e\u53d1\u9001\uff09\uff0c\u5728\u4e0d\u4f7f\u7528SCI \u65f6\uff0c\u8fd9\u4e24\u4e2a\u5f15\u811a\u4e5f\u53ef\u4f5c\u901a\u7528I\/O \u53e3\u3002\u53d1\u9001\u548c\u63a5\u6536\u7684\u64cd\u4f5c\u53ef\u4ee5\u5229\u7528\u72b6\u6001\u6807\u5fd7\u4f4d\u901a\u8fc7\u4e2d\u65ad\u9a71\u52a8\u6216\u67e5\u8be2\u7b97\u6cd5\u6765\u5b8c\u6210\u3002\u4e0e\u4e4b\u76f8\u5173\u7684\u4e3b\u8981\u5bc4\u5b58\u5668\uff1a\u53d1\u9001\u7f13\u51b2\u5bc4\u5b58\u5668SCITXBUF\u3001\u63a5\u6536\u7f13\u51b2\u5bc4\u5b58\u5668 SCIRCBUF\u3001\u63a5\u6536\u4eff\u771f\u7f13\u51b2\u5bc4\u5b58\u5668SCIRXEMU\uff1b\u901a\u4fe1\u63a7\u5236\u5bc4\u5b58\u5668SCICCR\u3001\u4e2d\u65ad\u4f7f\u80fd\u548c\u5185\u90e8\u65f6\u949f<\/u>\u4f7f\u80fdSCICTL1 \u548cSCICTL2 \u3001\u6ce2\u7279\u7387\u9009\u62e9\u9ad8\u5b57\u8282\u5bc4\u5b58\u5668SCIHBAUD\u3001\u6ce2\u7279\u7387\u9009\u62e9\u4f4e\u5b57\u8282\u5bc4\u5b58\u5668SCILBAUD\u3001\u4f18\u5148\u7ea7\u63a7\u5236\u5bc4\u5b58\u5668SCIPRI\u3001\u5f15\u811a\u63a7\u5236\u529f\u80fdSCIPC2 \u4ee5\u53ca\u53cd\u6620\u901a\u4fe1\u72b6\u6001SCIXST \u7b49\u3002<\/p>\n \n\t\u4e32\u884c\u901a\u4fe1\u63a5\u53e3\u6a21\u5757\u6709\u4e24\u4e2a\u591a\u5904\u7406\u5668\u901a\u4fe1\u534f\u8bae\uff1a\u7a7a\u95f2\u7ebf\u591a\u5904\u7406\u5668\u6a21\u5f0f\u548c\u5730\u5740\u591a\u5904\u7406\u5668\u6a21\u5f0f\u3002\u7a7a\u95f2\u7ebf\u6a21\u5f0f\u5728\u5730\u5740\u524d\u7559\u6709\u4e00\u4e2a\u56fa\u5b9a\u7a7a\u95f4\uff0c\u8be5\u6a21\u5f0f\u6ca1\u6709\u9644\u52a0\u7684\u5730\u5740 \/\u6570\u636e\u4f4d\uff0c\u5b83\u5728\u5904\u7406\u5305\u542b\u591a\u4e8e10 \u4e2a\u5b57\u8282\u7684\u6570\u636e\u5757\u65b9\u9762\u6bd4\u5730\u5740\u4f4d\u6a21\u5f0f\u66f4\u6709\u6548\uff1b\u5730\u5740\u4f4d\u6a21\u5f0f\u5728\u6bcf\u4e2a\u5b57\u8282\u4e2d\u52a0\u5165\u4e00\u4e2a\u989d\u5916\u4f4d\uff08\u5730\u5740\u4f4d\uff09\u6765\u533a\u5206\u5730\u5740\u548c\u6570\u636e\uff0c\u8fd9\u79cd\u6a21\u5f0f\u5728\u5904\u7406\u591a\u4e2a\u5c0f\u6570\u636e\u5757\u65f6\u66f4\u6709\u6548\u3002<\/p>\n \n\t3 RS-485<\/u>\u4e32\u53e3\u901a\u4fe1<\/p>\n \n\tRS<\/u>-232 \u867d\u7136\u88ab\u5e7f\u6cdb\u63a5\u53d7\uff0c\u4f46\u5176\u6570\u636e\u4f20\u9001\u7684\u901f\u5ea6\u6162\u3001\u5728\u73b0\u4ee3\u7f51\u7edc\u901a\u4fe1\u4e2d\u5df2\u66b4\u9732\u51fa\u7684\u63a5\u53e3\u5904\u5404\u4fe1\u53f7\u95f4\u5bb9\u6613\u4ea7\u751f\u5e72\u6270\u7b49\u660e\u663e\u7684\u7f3a\u70b9\u3002RS-232 \u53ea\u80fd\u4f20\u8f9315 \u7c73\uff0c\u4e0d\u80fd\u6ee1\u8db3\u8fdc\u8ddd\u79bb\u4f20\u8f93\u8981\u6c42\uff0c\u800cRS-485 \u6700\u5927\u4f20\u8f93\u8ddd\u79bb\u4e3a1200 \u7c73\uff0c\u6700\u5927\u4f20\u9001\u901f\u7387\u53ef\u8fbe10Mb\/s\u3002\u56e0\u6b64\uff0cRS-485 \u5728\u8fdc\u7a0b\u901a\u4fe1\u548c\u591a\u673a\u603b\u7ebf\u7cfb\u7edf\u4e2d\u5177\u6709\u5f88\u5927\u5438\u5f15\u529b\u3002MAX48X\uff0f49X \u7cfb\u5217\u6536\u53d1\u5668<\/u>\u82af\u7247\u9002\u5408\u4e8eRS \u4e00422\uff0fRS 485 \u901a\u4fe1\u6807\u51c6\u3002\u5176\u4e3b\u8981\u6709\u4ee5\u4e0b\u7279\u70b9\uff1a<\/p>\n \n\t<\/p>\n \n\t·\u5355+5V \u7535\u6e90\u4f9b\u7535\uff1b<\/p>\n \n\t· \u4f4e\u529f\u8017\uff1a\u5de5\u4f5c\u7535\u6d41<\/u>120\uff5e 500μA \uff1a<\/p>\n \n\t· \u9a71\u52a8\u8fc7\u8f7d\u4fdd\u62a4\uff1b<\/p>\n \n\t· \u901a\u4fe1\u4f20\u8f93\u7ebf\u4e0a\u53ef\u630232 \u4e2a\u6536\u53d1\u5668\u65b9\u4fbf\u7ec4\u6210\u534a\u53cc\u5de5\u901a\u4fe1\u7535\u8def\uff1b<\/p>\n \n\t· \u5171\u6a21\u8f93\u5165\u7535\u538b\u8303\u56f4\uff1a-7V \uff5e + l2V<\/p>\n \n\tMAX485 \u4e3a8 \u811a\u5c01\u88c5\uff0c\u5f15\u811a\u914d\u7f6e\u5982\u56fel \u6240\u793a\uff0c\u5404\u5f15\u811a\u529f\u80fd\u8bf4\u660e\u5982\u8868l \u6240\u793a\u3002<\/p>\n \n\t\u88681<\/p>\n \n\t<\/p>\n \n\t\u672c\u8bbe\u8ba1\u4ee5PC \u673a\u4e3a\u4e3b\u673a\uff0cTMS320F240 \u4e3a\u4ece\u673a\uff0c\u4e3b\u4ece\u673a\u4e4b\u95f4\u8fdb\u884c\u4e32\u53e3\u901a\u4fe1\u3002TMS320F240 \u4e0ePC \u673a\u4e4b\u95f4\u91c7\u7528RS \u4e00485 \u6807\u51c6\u8fdb\u884c\u534a\u53cc\u5de5\u901a\u4fe1\u7684\u63a5\u53e3\u7535\u8def\u5982\u56fe2 \u6240\u793a\u3002\u5176\u4e2d\uff0c\u63a5\u6536\u5668\u548c\u9a71\u52a8\u5668\u7684\u9009\u62e9\u7531TMS320F240 \u7684XF\uff0fIOPC2 \u5f15\u811a\u63a7\u5236\u3002\u7531\u4e8e\u4e00\u822cPC \u673a\u4e0a\u63d0\u4f9b\u7684\u662f\u6807\u51c6\u7684RS 232 C \u4e32\u884c\u63a5\u53e3\uff0c\u56e0\u6b64\uff0c\u9700\u8981RS 232C\uff0fRS485 \u8f6c\u6362\u5668\u8fdb\u884c\u63a5\u53e3\u8f6c\u6362\u3002<\/p>\n \n\t<\/p>\n \n\t4 \u4e0a\u4f4d\u673aPC\u673a\u7684\u8f6f\u4ef6\u8bbe\u8ba1<\/p>\n \n\t\u4e0a\u4f4d\u673aPC \u91c7\u7528\u9ad8\u7ea7\u8bed\u8a00C\uff0c\u5728\u7528C \u8bed\u8a00\u5f00\u53d1DSP \u5e94\u7528\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u5d4c\u5165\u4e00\u53e5\u6216\u51e0\u53e5\u6c47\u7f16\u8bed\u8a00\uff0c\u5982\u5728\u7a0b\u5e8f\u7684\u521d\u59cb\u5316\u9636\u6bb5\u5bf9INTM\u3001SXM \u7b49\u4f4d\u7684\u914d\u7f6e\u3002\u7528asm \u7684\u65b9\u5f0f\u5c31\u53ef\u4ee5\u5b9e\u73b0\u5355\u53e5\u6c47\u7f16\u8bed\u8a00\u7684\u5d4c\u5165\u3002<\/p>\n \n\tCode Composer Studio \u7b80\u79f0CCS\uff0c\u662fTI<\/u> \u516c\u53f8\u63a8\u51fa\u7684\u4e3a\u5f00\u53d1TMS320 \u7cfb\u5217DSP \u8f6f\u4ef6\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3002CCS \u5de5\u4f5c\u5728Windows \u64cd\u4f5c\u7cfb\u7edf\u4e0b\uff0c\u7c7b\u4f3c\u4e8eVC++<\/u>\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u91c7\u7528\u56fe\u5f62\u63a5\u53e3\u754c\u9762\uff0c\u63d0\u4f9b\u6709\u7f16\u8f91\u5de5\u5177\u548c\u5de5\u7a0b\u7ba1\u7406\u5de5\u5177\u3002\u5728CC \u73af\u5883\u4e0b\u4e32\u884c\u901a\u4fe1\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a\u5373\u540c\u6b65\u65b9\u5f0f\u548c\u5f02\u6b65\u65b9\u5f0f\uff0c\u5728\u6b64\u4ec5\u8ba8\u8bba\u5f02\u6b65\u65b9\u5f0f\u4e2d\u7684\u4e32\u884c\u901a\u4fe1\u3002PC \u4e32\u884c\u53e3\u53d1\u9001\u5668\u8f93\u51fa\u7aef\u548c\u63a5\u6536\u5668\u8f93\u5165\u7aef\u7684\u6570\u636e\u683c\u5f0f\u4e3a\u5e27\u4fe1\u606f\u683c\u5f0f\uff0c\u4e0eTMS320F240\u7684SCI \u53e3\u683c\u5f0f\u76f8\u540c\u3002\u901a\u4fe1\u65f6\uff0c\u53cc\u65b9\u5fc5\u987b\u7ea6\u5b9a\u901a\u4fe1\u6570\u636e\u4f20\u8f93\u683c\u5f0f\u3001\u4f20\u8f93\u901f\u7387\u53ca\u5404\u81ea\u5de5\u4f5c\u65b9\u5f0f\u7b49\u3002\u672c\u6587\u8bbe\u8ba1\uff0c\u5f53\u4e0a\u4f4d\u673a\u8bf7\u6c42\u901a\u8baf\u65f6\uff0c\u5148\u53d1\u8bf7\u6c42\u901a\u8baf\u547d\u4ee4\uff0c\u4e0b\u4f4d\u673a\u6709\u6548\u63a5\u6536\u5e76\u5224\u65ad\uff0c\u786e\u8ba4\u540e\u5411\u4e0a\u4f4d\u673a\u53d1\u54cd\u5e94\u7801\u3002\u4e0a\u4f4d\u673a\u5728\u6536\u5230\u54cd\u5e94\u7801\u540e\uff0c\u518d\u53d1\u64cd\u4f5c\u547d\u4ee4\u3002\u53cc\u65b9\u7ea6\u5b9a\uff1a\u6ce2\u7279\u7387208h\uff1b8 \u4f4d\u5b57\u7b26\uff0c\u4e00\u4f4d\u505c\u6b62\u4f4d\uff0c\u65e0\u6821\u9a8c\uff1b\u4f20\u9001\u65b9\u5f0f\uff1aPC \u673a\u91c7\u7528\u67e5\u8be2\u65b9\u5f0f\u63a5\u6536\u6570\u636e\uff0cTMS320F240 \u91c7\u7528\u4e2d\u65ad\u65b9\u5f0f\u63a5\u6536\u6570\u636e\u3002<\/p>\n \n\t5 DSP\u8f6f\u4ef6\u8bbe\u8ba1<\/p>\n \n\t5.1 \u4e32\u53e3\u521d\u59cb\u5316<\/p>\n \n\t\u9996\u5148\u5bf9\u5bc4\u5b58\u5668\u5730\u5740\u3001\u6ce2\u7279\u7387\u3001\u6570\u636e\u4f4d\u3001\u505c\u6b62\u4f4d\u3001\u5947\u5076\u6821\u9a8c\u4f4d\u8fdb\u884c\u8bbe\u7f6e\u3002<\/p>\n \n\tvoid Set\uff08\uff09<\/p>\n \n\t{<\/p>\n \n\t*SCICCR=0x7; \/\/8 \u4f4d\u5b57\u7b26\uff0c1 \u505c\u6b62\u4f4d\uff0c\u65e0\u6821\u9a8c<\/p>\n \n\t*SCICTL1=0X13; \/\/\u4f7f\u80fd\u53d1\u9001\u548c\u63a5\u53d7<\/p>\n \n\t*SCICTL2=0x03; \/\/\u4f7f\u80fd\u63a5\u53d7\u548c\u53d1\u9001\u4e2d\u65ad<\/p>\n \n\t*SCIHBAUD=0x02; \/\/\u6ce2\u7279\u7387=208h\uff0c40MHZ<\/p>\n \n\t*SCILBAUD=0x08; \/\/208h=40*106\/\uff089600*8\uff09-1<\/p>\n \n\t*SCICTL1=0x33; \/\/\u4f7f\u80fd\u53d1\u9001\u548c\u63a5\u53d7\uff0c\u590d\u4f4d<\/p>\n \n\t*SCIPRI=0X60; \/\/SCI \u4e2d\u65ad\uff08\u63a5\u53d7\u548c\u53d1\u9001\u4e2d\u65ad\uff09\u4e3a\u4f4e\u4f18\u5148\u7ea7\u4e2d\u65ad<\/p>\n \n\t}<\/p>\n \n\t5.2 \u4e2d\u65ad\u521d\u59cb\u5316<\/p>\n \n\ta\uff09\u7981\u6b62\u603b\u4e2d\u65ad\u5b50\u7a0b\u5e8f<\/p>\n \n\tvoid inline disable\uff08\uff09<\/p>\n \n\t{<\/p>\n \n\tasm\uff08\uff02setc INTM\uff02\uff09;<\/p>\n \n\tasm\uff08\uff02setc SXM\uff02\uff09;<\/p>\n \n\t}<\/p>\n \n\tb\uff09\u4f7f\u80fd\u603b\u4e2d\u65ad\u5b50\u7a0b\u5e8f<\/p>\n \n\tvoid inline enable\uff08\uff09<\/p>\n \n\t{<\/p>\n \n\tasm\uff08\uff02clrc INTM\uff02\uff09 ;<\/p>\n \n\t}<\/p>\n \n\tc\uff09\u4e2d\u65ad\u670d\u52a1\u7a0b\u5e8f<\/p>\n \n\tvoid inte<\/u>rrupt uart<\/u>tr\uff08\uff09{<\/p>\n \n\tswitch \uff08*PVIR\uff09{<\/p>\n \n\t\/\/\u6839\u636e\u4e2d\u65ad\u5411\u91cf\u5bc4\u5b58\u5668PVIR \u7684\u503c\u533a\u522b\u662f\u63a5\u6536\u8fd8\u662f\u53d1\u9001\u4e2d\u65ad<\/p>\n \n\tcase 6\uff1aUartRec\uff08\uff09;<\/p>\n \n\t\/\/\u5982\u679cPVIR=6\uff0c\u5219\u53d1\u751f\u4e86\u63a5\u53d7\u4e2d\u65ad\uff0c\u6267\u884c\u63a5\u53d7\u4e2d\u65ad\u670d\u52a1\u7a0b\u5e8f<\/p>\n \n\t}<\/p>\n \n\t}<\/p>\n \n\td\uff09\u5f53\u7531\u4e8e\u5e72\u6270\u800c\u5f15\u8d77\u5176\u5b83\u4e2d\u65ad\u65f6\uff0c\u4e2d\u65ad\u8fdb\u5165\u6b64\u7a0b\u5e8f\u76f4\u63a5\u8fd4\u56de\u4e3b\u7a0b\u5e8f<\/p>\n \n\tvoid interrupt nothing\uff08\uff09{<\/p>\n \n\treturn; }<\/p>\n \n\t5.3\u4e2d\u65ad\u5904\u7406<\/p>\n \n\tvoid UartRec\uff08\uff09{<\/p>\n \n\tunsigned int uwork;<\/p>\n \n\tint I\uff0c k;<\/p>\n \n\tk=0;<\/p>\n \n\twhile\uff081\uff09 {<\/p>\n \n\tdo{<\/p>\n \n\tuwork=\uff08*SCIRXST\uff09;<\/p>\n \n\t}while\uff08\uff08uwork&0x40= =0\uff09\uff09;<\/p>\n \n\tcReceive=\uff08*SCIRXBUF\uff09;<\/p>\n \n\tcBuffer\uff3bk\uff3d= cReceive;<\/p>\n \n\tif\uff08cReceive= =’\u3002’\uff09 {<\/p>\n \n\tcBuffer\uff3bk+1\uff3d=’’;<\/p>\n \n\tnlen=k+1;<\/p>\n \n\tSet\uff08\uff09;<\/p>\n \n\tBreak;<\/p>\n \n\t}<\/p>\n \n\tk++; k%=16;<\/p>\n \n\t}<\/p>\n \n\t}<\/p>\n \n\t5.4\u7a0b\u5e8f\u521d\u59cb\u5316<\/p>\n \n\t# include \uff022407c.h\uff02<\/p>\n \n\t\/\/\u521d\u59cb\u5316\u5b50\u7a0b\u5e8f<\/p>\n \n\tIniTIal\uff08\uff09{<\/p>\n \n\t*IFR=0xFFFF; \/\/\u6e05\u9664\u4e2d\u65ad\u6807\u5fd7<\/p>\n \n\t*WDCR=0Xe8; \/\/\u4e0d\u4f7f\u80fd\u770b\u95e8\u72d7<\/p>\n \n\t*SCSR<\/u>1=0x81FE; \/\/CLKIN=6M\uff0c CLKOUT=24M<\/p>\n \n\t*MCRA=0x3; \/\/use SCITXD\uff0c SCIRXD<\/p>\n \n\t*PADATDIR=0x100; \/\/\u8bbe\u7f6eADI<\/u>R \u4e3a\u8f93\u51fa\u53e3<\/p>\n \n\t}<\/p>\n \n\t5.5\u4e3b\u7a0b\u5e8f<\/p>\n \n\tMai<\/u>n\uff08\uff09{<\/p>\n \n\tSet\uff08\uff09;<\/p>\n \n\tDisable\uff08\uff09; \/\/\u5c4f\u853d\u6240\u6709\u4e2d\u65ad<\/p>\n \n\tIniTIal\uff08\uff09; \/\/\u7cfb\u7edf\u521d\u59cb\u5316<\/p>\n \n\tEnable\uff08\uff09; \/\/\u4f7f\u80fd\u603b\u4e2d\u65ad<\/p>\n \n\tWhile\uff081\uff09 {<\/p>\n \n\tunsigned int uwork;<\/p>\n \n\tFor \uff08inTI=0;I\u300a10;I++\uff09{<\/p>\n \n\tDo{<\/p>\n \n\tUwork=\uff08*SCICTL2\uff09;<\/p>\n \n\t}while \uff08uwork&0x0c0\uff01=0x0c0\uff09;<\/p>\n \n\t\uff08*SCITXBUF\uff09=cAn<\/u>swer\uff3bi\uff3d;<\/p>\n \n\t*IFR=0x0010;<\/p>\n \n\tEnable\uff08\uff09;<\/p>\n \n\t}<\/p>\n \n\tDo{<\/p>\n \n\tUwork=\uff08*SCICTL2\uff09;<\/p>\n \n\t}while \uff08uwork&0x0c0\uff01=0x0c0\uff09;<\/p>\n \n\t\uff08*SCITXBUF\uff09=‘“’;<\/p>\n \n\t}<\/p>\n \n\tFor\uff08;;\uff09{<\/p>\n \n\t\uff1a<\/p>\n \n\t}<\/p>\n \n\t}<\/p>\n \n\t6\u7ed3\u675f\u8bed<\/p>\n \n\t\u672c\u6587\u4f5c\u8005\u521b\u65b0\u70b9\uff1a\u5229\u7528DSP \u7684\u4e32\u884c\u901a\u4fe1\u63a5\u53e3\uff08SCI\uff09\u548c\u529f\u80fd\u5f3a\u5927\u7684\u5f00\u53d1\u73af\u5883CCS\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b9e\u73b0DSP \u4e0ePC \u673a\u95f4\u7684\u5355\u673a\u6216\u591a\u673a\u4e32\u884c\u901a\u4fe1\u3002\u901a\u8fc7\u5b9e\u9645\u8fd0\u884c\u8868\u660e\uff0c\u5229\u7528TMS320 \u7684SCI \u6a21\u5757\u5b9e\u73b0DSP \u4e4b\u95f4\u6216\u4e0ePC \u673a\u7684\u901a\u4fe1\uff0c\u4e0e\u4f20\u7edf\u7684C51 \u5355\u7247\u673a<\/u>\u76f8\u6bd4\uff0c\u5176\u7535\u8def\u7b80\u5355\u3001\u8bbe\u7f6e\u7075\u6d3b\u3001\u8fd0\u884c\u901f\u5ea6\u5feb\uff0c\u6027\u80fd\u53ef\u9760\u7a33\u5b9a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" 1 \u5f15\u8a00 DSP \u65e2\u662fDigital Signal Pricessing \u7684\u7f29\u5199\uff0c\u4e5f\u662fDigital Signal Pricessor \u7684\u7f29\u5199\u3002\u524d\u8005\u662f\u6307\u6570\u5b57\u4fe1\u53f7\u5904\u7406\u7684\u7406\u8bba\u548c\u65b9\u6cd5\uff0c\u540e\u8005\u5219\u662f\u6307\u7528\u4e8e\u6570\u5b57\u4fe1\u53f7\u5904\u7406\u7684\u53ef\u7f16\u7a0b\u5fae\u5904\u7406\u5668\u3002TMS320F240 \u7cfb\u5217\u662f\u5728<\/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\/2126"}],"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=2126"}],"version-history":[{"count":0,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/2126\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2126"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}