【正文】
方案。本數(shù)據(jù)采集和控制系統(tǒng)是以飛利浦 公司的 PDIUSBD12 作為系統(tǒng)的微控制器,管理和控制整個系統(tǒng)。經(jīng)實驗測試,該系統(tǒng)采集速度快,死時間小,計數(shù)率高。該總線接口具有安裝方便、高帶寬、易于擴(kuò)展、使用靈活等優(yōu)點,已逐漸成為現(xiàn)代數(shù)據(jù)傳輸研究的發(fā)展趨勢。傳統(tǒng)的外設(shè)與主機(jī)的通訊接口一般是基于PCI總線、ISA 總線或者是 RS-232C 串行總線。隨著 pc 機(jī)日益廣泛的應(yīng)用 ,其外設(shè)也逐日增多 ,但 pc 機(jī)接口的數(shù)量是一定的,這就限制了 pc 機(jī)掛接外設(shè)的數(shù)量。驅(qū)動程序以 WDM 為模型,以 DDK 為開發(fā)工具,以 IRP 為消息傳播載體,來實現(xiàn)與Windows 系統(tǒng)底層核心機(jī)制向交互的功能。關(guān)鍵詞 數(shù)據(jù)采集系統(tǒng);usb 接口;單片機(jī)AbstractData acquisition uses a bination of PCbased measurement hardware and software to provide a flexible, userdefined measurement system. Data acquisition involves gathering signals from measurement sources and digitizing the signal for storage, analysis, and presentation on a personal puter (PC).As a new interface Specification.the Universal Serial Bus (USB) has the advantages of convenient、expansibility、low cost and anti—disturbance. So it is fit for the munication interface between the host and available peripherals USB delivers an inexpensive, easytouse connection between data acquisition devices/instruments and PCs. USB munication technology can enable highspeed, strong errorcorrecting capabilities, easy extensibility, plugandplay convenience, bined with anic. USB technology is not even in the face of a long time, but because of its many advantages, more and more accepted by manufacturers and users. This thesis introduce to the hardware and software design for the high speed data acquisition system based on Single chip micro puter and USB.Key words data acquisition;universal serial bus interface;Single chip micro puter目錄摘要 ........................................................................................................................................IAbstract..................................................................................................................................II第 1 章 緒論 ..........................................................................................................................1 研究的背景及目的 ...................................................................................................1 國內(nèi)外研究現(xiàn)狀及已有成果 ...................................................................................1 課題的研究方法和內(nèi)容 ...........................................................................................2第 2 章 總體方案設(shè)計 ..........................................................................................................3 芯片比較 ...................................................................................................................3 單片機(jī)選型 .........................................................................................................3 USB 接口芯片的選擇 .........................................................................................3 系統(tǒng)的原理及其組成 ...............................................................................................5第 3 章 系統(tǒng)的程序設(shè)計 ......................................................................................................7 系統(tǒng)的硬件設(shè)計 .......................................................................................................7 PDIUSBD12 的性能特點和內(nèi)部結(jié)構(gòu) ................................................................7 PDIUSBD12 的端點描述 ....................................................................................9 PDIUSBD12 的指令集 ......................................................................................10 PDIUSBD12 的管腳配置 ..................................................................................11 A/D 與單片機(jī)接口電路 ....................................................................................13 PDIUSBD12 與單片機(jī)接口電路 ......................................................................14 系統(tǒng)的軟件設(shè)計 .....................................................................................................14 PDIUSBD12 的固件編程思想 ..........................................................................14 PDIUSBD12 固件編程的結(jié)構(gòu) ..........................................................................15 PDIUSBD12 固件編程的實現(xiàn) ..........................................................................17 端點處理程序 ...................................................................................................18 主循環(huán) .....................................................................................21 驅(qū)動程序開發(fā)工具的介紹 ...............................................................................22 USB 設(shè)備驅(qū)動程序設(shè)計 ...................................................................................23 USB 設(shè)備驅(qū)動程序的調(diào)用 ...............................................................................24第 4 章 方案設(shè)計的分析及本研究的創(chuàng)新策略 ................................................................26 方案的可行性、實驗過程、數(shù)據(jù)的處理及分析 .................................................26 系統(tǒng)硬件設(shè)計分析 ...........................................................................................26 系統(tǒng)軟件設(shè)計分析 ...........................................................................................26 本次設(shè)計的創(chuàng)新與改進(jìn) .........................................................................................27結(jié)論 ......................................................................................................................................29致謝 ......................................................................................................................................30參考文獻(xiàn) ..............................................................................................................................31附錄 A..................................................................................................................................32附錄 B ............................................................................................................................................................43第1章 緒論1. 1 研究的背景及目的信息技術(shù)與電子技術(shù)的迅猛發(fā)展,使得計算機(jī)和外圍設(shè)備也得到飛速發(fā)展和應(yīng)用。通用串行總線 (USB)作為一種新的微機(jī)總線接口規(guī)范.具有便捷、易擴(kuò)展、低成本、低干擾等特點,非常適合作為主機(jī)和外設(shè)之間的通信接口。數(shù)據(jù)采集包括從信號源采集信號,將其進(jìn)行數(shù)字化,存儲分析并傳遞到個人 PC 上。USB 技術(shù)雖然出現(xiàn)的時間并不長,但是由于它的種種優(yōu)點,被越來(論文)設(shè)計了一種基于單片機(jī)和 USB 的高速