版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
Lecture2AgendaFirstthreeUSBlayersSignalingPacketsTransfersHands-on:BULKINtransfersusingEZ-USBchipandtoolsKeilIntegratedDevelopmentEnvironment(IDE)EZ-USBControlPanelOSInterfaceRequestsTransfersTheUSBOnionPacketsSignalingSignalingReflected-waveSignaling
1footcabledriverreceiverReflected-waveSignaling
2metercabledriverreceiverReflected-waveSignaling
5metercabledriverreceiverTheSIE
(SerialInterfaceEngine)SerialInterfaceEngine(SIE)D+BytesUSBTransceiverD+PacketsPackets:IdentifiedbyPIDSThreePacketTypesWhattheSIEDoesSerialInterfaceEngine(SIE)SYNCOUTADDRENDPCRC5TokenPacketSYNCDATA1PayloadDataCRC16DataPacketSYNCACKSYNCOUTADDRENDPCRC5TokenPacketSYNCDATA0PayloadDataCRC16DataPacketSYNCACKH/SPktPayloadDataPayloadDataACKD+D-USBTransceiverTransfersBulkControlIsochronousInterruptBulkINTransfer(a)INADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktINADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketACKH/SPktHDHHHDgood—notethedatatogglegoodBulkINTransfer(b)INADDRENDPCRC5TokenPacketNAKH/SPktINADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktHDHHDINADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketACKH/SPktHDHgoodgoodnotreadyBulkINTransfer(c)INADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketH(H)DINADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktHHDgood—notesamedataanddata
togglehostseeserror;noresponseBulkINTransfer(d)INADDRENDPCRC5TokenPacketSTALLH/SPktHDINADDRENDPCRC5TokenPacketH(D)devicehasaproblemdevicedetectstokenerrorordoesnotrespondBulkOUTTransfer(a)OUTADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketACKH/SPktOUTADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktHHDHDHgood—notethedatatogglegoodBulkOUTTransfer(b)OUTADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktHDHOUTADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketACKH/SPktHHDgoodgoodOUTADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketNAKH/SPktHHDdevicenotreadyfordatahostsendsdataanywayBulkOUTTransfer(c)OUTADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketH(D)HOUTADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktHDHgooddeviceseeserror;noresponseBulkOUTTransfer(d)OUTADDRENDPCRC5TokenPacketSTALLH/SPktHDOUTADDRENDPCRC5TokenPacketH(D)devicehasproblemdevicedetectstokenerrorDATA1PayloadDataCRC16DataPacketHDATA1PayloadDataCRC16DataPacketHControlTransferINADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktDATA08bytesSetupDataCRC16DataPacketACKH/SPktSETUPADDRENDPCRC5TokenPacketHHDDATA1OUTADDRENDPCRC5TokenPacketCRC16DataPktNAKH/SPktHHDHDHDATA1OUTADDRENDPCRC5TokenPacketCRC16DataPktACKH/SPktHHDControloperationnotcompletedControloperationcompletedSETUPDATAHANDSHAKEInterruptIN&OUTINADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktINADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketACKH/SPktHDHHHDgood—notethedatatogglegoodOUTADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketACKH/SPktOUTADDRENDPCRC5TokenPacketDATA1PayloadDataCRC16DataPacketACKH/SPktHHDHDHgood—notethedatatogglegoodInterrupttransfersareindistinguishablefromBULKtransfers.Theyoccuratmostonceperframe.
IsochronousTransferINADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketOUTADDRENDPCRC5TokenPacketDATA0PayloadDataCRC16DataPacketNote:AlwaysDATA0PID,noACKHDHHHands-on:
BulkINtransfers
usingtheEZ-USBchip
andtoolsBULKINTransfer
Registerandbitassignments/*bulkin_a.C6-18-00LTHASimplebulkINtransfer.LoadsEP2INbufferwithanincrementingcount,thenarmsIN2fortransfer.Whentransmitted,replacebytezerooftheEP2INbufferwithacountindicatingthenumberofINtransfersandre-armEP2INforthenextINtransfer.*/xdatavolatilecharIN2BUF[64]_at_0x7E00;
//TRMp.12-3xdatavolatilecharIN2BC_at_0x7FB9;
//TRMp.12-34xdatavolatilecharIN2CS_at_0x7FB8;
//TRMp.12-32#define bBSY 0x02
//TRMp.12-32BULKINTransfer
Ccodecharj,count;main(){for(j=0;j<64;j++) //fillIN2bufferwithincrementingcount
IN2BUF[j]=j;IN2BC
=50; //armthefirsttransfercount=0; //initializetransfercounterwhile(1) //forever { while(IN2CS
&bBSY); //loopwhileIN2busybitisHI count++; //busybitwentLO--IN2BUFreadyformoredata
IN2BUF[0]=count; //replacefirstbufferbytewithcount
IN2BC =50; //armthenextIN2transferbyloadingbytecount } }FirstProjectTutorial
Makeafolderforallclassprojects
Firstprojectfolderis‘bulkin’1StartuV2,CreateanewProject
Navigateto‘usbcode\bulkin’234SelectDevice:EZ-USB(AN21XX)5,type(orpaste)‘bulkin.c’67Saveas‘bulkin.c’8Project/Targets…/AddFiles(selectSourceGroup1)9Select‘bulkin.c’,Addtoproject10Nowit’sshownunderSourceGroup1Project/Options…11Outputtab,check‘CreateHEXFile’box12Click‘buildtarget’13Checkfor‘bulkin.hex’fileIfit’notthere,the‘createHEXfile’projectoptionisnotchecked(step12)14ConnecttheEZ-USBDevBoardConnecttheEZ-USBboardtoaUSBportNOTE:Win2Kmayadvisethatyouneed‘a(chǎn)dministratorprivileges’toinstallRedPWRlightindicatespresenceofVbus(5VfromUSBconnector)Greenlight
meanssuccess.Specifically:TheEZ-USBdriveiscorrectlyinstalledThesystemrecognizedtheboardThedebugmonitorprogramhasloadedsuccessfullyNote:PressingboardRESETdisconnects,thenreconnectstheboardasifyouhaddoneitmanually.17Start‘ControlPanel’151615aNote:ThisisaskedonlyonceandstoredintheRegistry.EndpointTypeAlternateSetting(Interface=0)012MaxPacketSize(bytes)0CTL6464641ININT016642INBULK064642OUTBULK064644INBULK064644OUTBULK064646INBULK064646OUTBULK064648INISO0162568OUTISO0162569INISO016169OUTISO0161610INISO0161610OUTISO01616FromtheTRMDownload‘bulkin.hex’intoboard1819Viewdownloadedhexfile20SelectEndpoint2-IN2122Cleartextwindow,Click‘BulkTransfer’232450Bytesweretransferred
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 招標(biāo)文件評(píng)審記錄跟蹤查詢
- 九年級(jí)道德與法治上冊(cè) 第二單元 感受祖國(guó)的心跳 第四課 城鄉(xiāng)直通車 第3框 城鄉(xiāng)統(tǒng)籌教案 人民版
- 2024-2025學(xué)年新教材高中生物 第1章 遺傳因子的發(fā)現(xiàn) 第1節(jié) 第1課時(shí) 一對(duì)相對(duì)性狀的雜交實(shí)驗(yàn)過(guò)程和解釋教案 新人教版必修第二冊(cè)
- 安徽省滁州二中高中信息技術(shù)《5.1認(rèn)識(shí)信息資源的管理》教案 新人教版必修
- 廣東省2024-2025年高中物理 學(xué)業(yè)水平測(cè)試沖A 第6章 機(jī)械能和能源教案(含解析)
- 2023七年級(jí)英語(yǔ)下冊(cè) Unit 3 How do you get to school Section B 第5課時(shí)(3a-3b)教案 (新版)人教新目標(biāo)版
- 2023六年級(jí)數(shù)學(xué)下冊(cè) 第四單元 圓柱和圓錐4.8 估算小麥堆的質(zhì)量教案 冀教版
- 自建房修建及安全合同(2篇)
- 人教版血管課件
- 第六講 變換句型寫一寫(看圖寫話教學(xué))-一年級(jí)語(yǔ)文上冊(cè)(統(tǒng)編版·2024秋)
- 小班繪本故事《我的門》
- 公司企業(yè)保密知識(shí)培訓(xùn)(精品推薦)
- 220KV輸電線路工程施工組織設(shè)計(jì)
- 高爾斯華綏《品質(zhì)》
- 稻瘟病及其研究成果
- 生物質(zhì)炭化技術(shù)
- 物理化學(xué):第二章 熱力學(xué)第二定律
- 纖維素酶發(fā)酵工藝與應(yīng)用
- YZP系列冶金及起重用變頻調(diào)速三相異步電動(dòng)機(jī)
- 《中國(guó)音樂(lè)分類》PPT課件
- 第7章墨水中的流變特性及流變調(diào)節(jié)劑
評(píng)論
0/150
提交評(píng)論