28120053ChineseJournalofElectronDevicesVol.28No.1Mar.2005AMethodoftheCommunicationbetweenFPGAandtheUSBHostBasedonFT245BMCAIJiang2hong,SHIXiao2jun,ZHUWei,DUGuo2liang(ElectronicsDepartmentSoutheastUniversity,Nanjing210096,China)Abstract:ThisarticleintroducesamethodofthecommunicationbetweenFPGAandtheUSBhost.TheauthorsucceededincommunicatingwithPCusingaUSBchipFT245BM,producedbyFTDI(FutureTechnologyDevicesIntl.Ltd).AcircuitdiagramoftheinterfacebetweentheFT245BMchipandtheFPGAchipisprepared.TheprogramofFPGA,writteninVerilogHDL,andthesoftwarerunninginPCaregiven;Keywords:FT245BM;USB;FPGAEEACC:4220FT245BMFPGAPCUSB,,,(,210096):2004209224:(19792),,,,cjh-xf@sina.com:FPGAUSBFTDI(FutureTechnologyDevicesIntl.Ltd)USBFT245BM,FPGAPCUSB;FPGA,FPGAVerilogHDLPC:FT245BM;USB;FPGA:TN919:A:100529490(2005)0120132203,,USBFPGA;,FPGA,FPGAPCUSB,USB,PC,,FT245BMUSBI/O,,,USB1FT245BMFT245BMFTDIUSB,,,USBI/O,USB1.1USB2.0,1MB/SFT245BMUSB(SIE)USBFIFO128byteFIFO384bytFIFOEEPROM93C46,USBFT245BM13.3V,16MHz8USBFT245BM32PQFP,,2FT245BMUSBUSB500mA,,,;,FT245BMFPGA,8FPGAFPGA5V,3.3V,2.5V,1.8V,1.5V,FT245BM5V3.3V,I/OAlteraACEX1K50,2.5V,I/O2.5V3.3V,3.3VI/O1FT245BMACEX1K50:,3.3VI/OD0D7,RDPWRTXDRXF1FT245BM25ACEX1K50PWRENUSB,PC,FT245BMSI/WUFPGAI/OACEX1K50RAM,;ACEX1K5024kbitRAM,RAMRAMFT245BMFPGA,RXFTXE,:3311,:FT245BMFPGAPCUSB2RXF3TXEACEX1K50VerilogHDL://FT245BMalways@(posedgeclk)beginif(!RXF)//begincase(Rnd_State)0:beginUSB_RD=0;Rnd_State=Rnd_State+1;end1:begin//USBRead_DataRead_Data=USB_DATA;Rnd_State=Rnd_State+1;end2:beginRnd_State=0;USB_RD=1;endendcaseendend//FT245BMalways@(posedgeclk)beginif(!TXE)//begincase(Wrt_State)0:beginWrt_State=Wrt_State+1;USB_WD=1;end1:begin//USB_DATAUSB_DATA=Write_Data;Wrt_State=Wrt_State+1;end2:beginWrt_State=0;USB_WD=0;endendcaseendend,,FPGAI/O,,;,4FT245BMUSB,PCFTDI,VirtualCOMPortDriversD2XXDLLUSBDriversUSB,PC,;,,1MB/S;FT_HANDLEftHandle;FT_STATUSftStatus;DWORDEventDWord,RxBytes,RxBytes,BytesReceived,BytesSend;charRxBuffer[256],TxBuffer[256];//ftStatus=FT_Open(0,&ftHandle);if(ftStatus==FT_OK){::AfxMessagebox(,USB);}else{::AfxMessagebox(,);}//USBFT_GetStatus(ftHandle,&RxBytes,&TxBytes,&EventDWord);if(RxBytes0){ftStatus=FT_Read(ftHandle,RxBuffer,RxBytes,&BytesReceived);if(ftStatus==FT_OK){::AfxMessagebox(,);}else{::AfxMessagebox(,);}}//USBftStatus=FT_Write(ftHandle,TxBuffer,TxBytes,&BytesSend);(137)431283#3,GaAsMESFETsPECVDSiNx,,/SiNx,,,PECVDSiNxGaAsMESFETs,4V,PECVDSiNxMESFET,PECVDSiNx,PECVDSiNx,,PECVDSiNx:[1]LeeJong2Lam,KimDojin,SungJaeMaeng,etal.Im2provementofbreakdowncharacteristicsofaGaAspowerfield-effecttransistorusing(NH4)2SXtreatment[J].JApplPhys,1993,73(7):3539-3541.[2]LiChi2Lung,BartonTrevorM,MilesRobertE.Avan2lanchebreakdownandsurfacedeep-leveltrapeffectsinGaAsMESFETs[J].IEEETrans.ElectronDevices,1993,40(4):811-816.[3]BartonTT,LadbrookePH.TheroleofthedevicesurfaceinthehighvoltagebehaviouroftheGaAsMESFET[J].SolidStateElectronics,1986,29(8):807-813.[4]DongY,DingXM,HouXY,etal.SulfurpassivationofGaAsmetal-semiconductorfield-effecttransistor[J].ApplPhysLett,2000,77(23):3839-3841.[5]SandroffCJ.IEEETran-ElectrDevices[J].1992,39:561.[6]HobsonWS.JVacSciTechnil.[J].1995,13:642.(134)if(ftStatus==FT_OK){::AfxMessagebox(,);}else{::AfxMessagebox(,);}//ftStatus=FT_Close(0,&ftHandle);if(ftStatus==FT_OK){::AfxMessagebox();}else{::AfxMessagebox(,);}PCFT245BM,,,,5FT245BMFPGAPCUSBACEX1K50FT245BM,FT245BM,,,USB:[1]USBFT245AMARINC429[J].,2003.[2],,FT245BMUSB[Z],2003.[3],USBFT245BM[Z].[4]J.Bhasker,.VerilogHDLSynthesis-APracticalPrimer[M]..[5],.FPGA[M]..7311GaAsMESFETs