MICROPROCESSORSTMS320F28335DSPPC*257061TMS320F28335DSPPCRS485、RS485。DSPDSPDSPPC。MSCOMMRS-485DOI10.3969/j.issn.1002-2279.2011.04.009TP311.52A1002-2279201104-0031-03ADesignofSerialCommunicationBetweentheTMS320F28335DSPandPCXUQiangZHAORen-deMAShuaiCollegeofInformationandControlEngineeringChinaUniversityofPetroleumDongying257061ChinaAbstractThepaperintroducesserialcommunicationbetweentheTMS320F28335DSPandPCthroughRS485.Thenthesoftwaredesignsandthecircuitconnectionisprovided.DSPcommunicationprogramusingpolledalgorithmswithstatusflagscancombinewithotherprogramsandensurethattheserialcommunicationbetweenDSPandPCwillnotdisturbotherfunctions.KeywordsDSPMSCOMMOCXRS-485CommunicationSerialCommunication1DSP。DSPDSPPCDSPPCPCDSP。TMS320F28335TMS320FC2000DSP1、、、、。SCICPU4。F2833516FIFOFIFO。VC++6.0WindowsPCDSP。2DSPPCF28335SCIA、SCIB、SCICI/OSCIxTXDSCIxRXDxA、B、C。SCIxTXDSCIxRXDRS-232MAX3232。RS-2322。、RS-485。RSM3485CHT5、、RS-485RSM3485CHTDSPRS-485。1。RSM3485CHT3DSPSCIxTXD4DSPSCIxRXD5、420118No.4Aug.2011*10CX04036A1987-、。2011-03-08DSPI/O55。PCRS-232PCRS-485/RS-232RS-485。1RS-485PCTMS320F283353DSPPCDSPCCS3.3VC++6.0。9600bit/s、8、1。PCDSPDSPPCPC。3.1DSP3.1.1DSPF28335SCI4。SCI、、、。。。DSPDSP。DSP。。。FIFOSCIFIFOSCIFFTXTXFFSTFIFOSCIFIFOSCIFFRXRXFFSTFIFO。。。SCIScibRegs.SCICCR.all=0x0007//18ScibRegs.SCICTL1.all=0x0003//TXRXSCICLKScibRegs.SCICTL2.all=0x0003ScibRegs.SCICTL2.bit.TXINTENA=0//TXRDYScibRegs.SCICTL2.bit.RXBKINTENA=0//RXRDYScibRegs.SCIHBAUD=0x0001ScibRegs.SCILBAUD=0x00E7//CPU150MHZ9600bit/sScibRegs.SCICTL1.all=0x0023//SCISCIFIFOScibRegs.SCIFFTX.all=0xE040//FIFOTXFIFOScibRegs.SCIFFRX.all=0x204f//RXFIFOScibRegs.SCIFFCT.all=0x0GPIORSM3485CHTGPIOGpioDataRegs.GPASET.bit.GPIO17=1//DSPRSM3485CHT。3.1.22。WhileScicRegs.SCIFFRX.bit.RXFFST=0……//FIFOforwhile。DSP。。msRSM3485CHT。·23·2011TMS320F28335DSPPCRSM3485CHT。。2DSP3.2PCVC++6.0ActiveXMSCOMM1。#include“mscomm.h”。3.2.1。“”myComm.SetCommPortPort//myComm.SetSettings“9600N81”//9600bit/s81myComm.SetInBufferSize1024//myComm.SetOutBufferSize1024//myComm.SetInBufferCount0//myComm.SetInputMode1//myComm.SetRThreshold1//myComm.SetPortOpen1//“Port”COM。“”myComm.SetPortOpen0//“”“”。PC。3.2.2MSCommGetinputSetOutput。VARIANTPC。Count=m_senddata.GetLength//CByteArraym_Array//CbyteArraym_Array.RemoveAll//m_Array.SetSizeCount//m_ArrayFori=0i<Count++m_Array.SetAtim_senddata.GetAti//CbyteArraym_ArraymyComm.SetOutputColeVariantm_Array//m_ArrayColeVariantMSCommOnComm1myComm.GetCommEvent2VARIANTm_input//VARIANTBYTEdata1000//BYTECOleSafeArraysafearray//COleSafeArraym_input=myComm.GetInput//safearray=m_input//VARIANTCOleSafeArrayLenl=safearray.GetOneDimSize//Fork=0k<lenlk++safearray.GetElement&kdata+k//BYTEdata37·33·4Ti、T'iATi。RTi、RT'iTi、T'iRAA1。k1、k2、k30<k1、k2、k3<1k1+k2+k3=1。PageRank。URL。。URLURLURL。PR'AURLURL。URLURL。PageRank。4Internet。———、。。1.D.2006.2MichaelChauHsinchunChenetc.AWebPortalforNanoscaleScienceandTechnologyA.InternationalConferenceonDigitalLibrariesC.NewYorkUSAACMPress2002373-373.3SCharkrabartiBDom.FocusedcrawlingAnewapproachtotopic-specificWebresourcediscoveryA.ComputerNetworksC.NetherlandsElsevierScience19991623-1640.4.WEBD.2006.5PangningTanVipinKumar.ModelingofWebRobotNav-igationalPatternsA.WebMiningforE-CommerceC.BostonUSAACMPress2000.6OWKwonJHLee.WebPageClassificationBasedonK-nearestNeighborApproachA.InternationalWork-shoponInformationRetrievalwithAsiaLanguagesC.NewYorkUSAACMPress20009-15.7TaoMengHongfeiYanJiminWangXiaomingLi.Theevolutionoflink-attributesforpagesanditsimplicationsonWebcrawlingA.WebIntelligenceC.WashingtonUSAIEEEComputerSociety2004578-581.33、。PCPCPC。4TMS320F28335DSPPCRS-485、。。1.VisualC++M.2009.2.DSPPCJ.20084155-157.3TexasInstruments.TMS320F28335TMS320F28334TMS320F28332DigitalSignalControllersDSCsDataManualZ.TexasInstruments2007.4TexasInstruments.TMS320x28xx28xxxDSPSerialCom-municationInterfaceSCIReferenceGuideZ.TexasInstruments2004.5.RS-485Z.2009.·73·4