【正文】
F2812 還包含一塊 16K 16 位的單周期訪 問(wèn)的 RAM 存儲(chǔ)器 xx 大學(xué)學(xué)士學(xué)位論文 21 ( SRAM),這部分存儲(chǔ)器被分為 3 塊,分別是 L0( 4K), L1 ( 4K), H0( 8K)。 一般情況下,在系統(tǒng)成功應(yīng)用之前,我們要做大量的調(diào)試工作,以確保板卡和軟件程序正常工作,為了方便軟件調(diào)試, JTAG 接口尤為重要,只有 JTAG接口設(shè)置好,才能通過(guò)仿真器被 CCS 識(shí)別,從而進(jìn)行大量的訪真測(cè)試實(shí)驗(yàn)。系統(tǒng)的時(shí)鐘電路如圖 35 所示。 電源電路設(shè)計(jì)時(shí)要注意數(shù)字地和模擬地分開(kāi),系統(tǒng)設(shè)計(jì)中用 600R 100MHz 1A 的磁珠將兩者分開(kāi),避免公共地阻抗對(duì)模擬信號(hào)和數(shù)字信號(hào)產(chǎn)生耦合作用。 7. 16 個(gè)結(jié)果寄存器(可獨(dú)立尋址)存放 ADC 的轉(zhuǎn)換結(jié)果,轉(zhuǎn)換后的數(shù)字量表示為:數(shù)字值 =4095 {(輸入模擬電壓值 — ADCLO) 247。另外,通過(guò) /RD 和 /CS 為低電平可使數(shù)據(jù)讀出到并行輸出總線。一種是前端外擴(kuò)一個(gè)專 用的模數(shù)轉(zhuǎn)換芯片 [20],比如外擴(kuò)一片 ADS8364,采樣精度可達(dá)到 16 位;另外一種是直接應(yīng)用 F2812 的 ADC 模塊,由于芯片自身的一些限制, AD 轉(zhuǎn)換的精度最多只能達(dá)到 12 位。許多 DSP 都提供了具備片內(nèi) ROM 型的產(chǎn)品,片內(nèi) ROM 可以將定型的程序代碼固化到 DSP 片內(nèi),從而減少了系統(tǒng)的體積、功耗、電磁輻射干擾,速度也有所提高,當(dāng)大批量生產(chǎn)可以降低成本。 USB 總線接口具有熱插拔、速度快(包括低、中、高模式)和外設(shè)容量大(理論上可掛接 127 個(gè)設(shè)備)、支持即插即用( Plugamp。 3. 存儲(chǔ)空間: 18k 16 位 0 等待周期片上 SRAM 和 128K 16 位片上FLASH(存儲(chǔ)時(shí)間 36ns); 3 個(gè)獨(dú)立的片選信號(hào),最多 1MB 的尋址空間。在改進(jìn)的哈佛結(jié)構(gòu)的基礎(chǔ)上,大多數(shù) DSP 芯片又引入了流水線操作以減少每條指令的執(zhí)行時(shí)間,從而進(jìn)一步增強(qiáng)處理器的楚劇處理能力。該系統(tǒng)要求采樣的精度到 8位數(shù)字量,用 F2812 自帶的 ADC 模塊就可達(dá)到很好的效果,省去了專用的ADC 芯片,使系統(tǒng)的時(shí)序控制變得簡(jiǎn)單,從而降低了系統(tǒng)的復(fù)雜性,也節(jié)約了成本 。 4 . 在 TI 公司的 Code Composer Studio for C20xx ( ccs )下對(duì)TMS320F2812 進(jìn)行軟件仿真,熟悉 CCS 的開(kāi)發(fā)環(huán)境,在內(nèi)部 進(jìn)行一些算法調(diào)試工作。 圖 11 典型的 DSP 應(yīng)用系統(tǒng) 輸入信號(hào)首先進(jìn)行帶限濾波抽樣,然后進(jìn)行 AD 轉(zhuǎn)換把模擬信號(hào)變換成數(shù)字信號(hào)。 20 世紀(jì) 60 年代以來(lái),數(shù)字信號(hào)處理器 (Digital Signal Processing,DSP)日漸成為一項(xiàng)成熟的技術(shù) ,并在多項(xiàng)應(yīng)用領(lǐng)域逐漸替代了傳統(tǒng)模擬信號(hào)處理系統(tǒng) .傳統(tǒng)的信號(hào)處理系統(tǒng)采用模擬技術(shù)進(jìn)行設(shè)計(jì)和分析,處理設(shè)備和控制器采用模擬器件實(shí)現(xiàn) .與之相比,數(shù)字信號(hào)處理技術(shù)與設(shè)備具有靈活、精確、抗干擾能力強(qiáng)、設(shè)備尺寸小、速度快、性能穩(wěn)定和易于升級(jí)等優(yōu)點(diǎn) ,所以目前大多設(shè)備采用數(shù)字技術(shù)設(shè)計(jì)實(shí)現(xiàn) [1]。很多要求對(duì)快速處理的實(shí)時(shí)數(shù)據(jù)采集處理系統(tǒng),選用 DSP(數(shù)字信號(hào)處理器 )作為核心處理器。 關(guān)鍵詞 數(shù)字信號(hào)處理器 ; 數(shù)據(jù)采集 ; USB xx 大學(xué)學(xué)士學(xué)位論文 II The Design of Data Acquisition System Based on DSP Abstract With the rapid development of puter and information technology, Digital signal processing technology has been more and mole important in highspeed and realtime is widely used in graph and image processing, voice identification,intelligent checking,industry control and other lot of reatimedata acquisition and processing systems choose DSP(Difital Signal Processor)as hiscore processor,which ask for dealing with the collecting image data this paper,we proposed a highspeed data collection system based on the digital signal solved a lor of technology problems and difficulties in the system design and implement way of all kinds of function units is also introduced and analyzed in this paper. The data acquisition and processing system pletes acquisition and processing to the analog signals and control of the machine using the chip of this chip has abundant of peripheral,we can have a simple circuit architecture,a lowcost and a short development time by using choose USB(Universal Serial Bus) as the munication interface of DSP and the puter which can fulfill up datatransfer and the control to acquisitioned and processed data is transferred to PC through the USB and dealed with by the top software. According to the system’s need,we choose the analog to digital unit inside DSP asthe system’s through the pare of two design themes,which is proved to meet theneed of the system totally through the results of methods are also bringedforward to improve to the precision of the internal A/D converter and remove theelectric ,we use simultaneous sampling mode and cascadedsequencer mode to improve the acquisition and convert speed. As for the order of electrifying for core professorTMS320F2812,it’s CPU is electrified earlier than the I/O peripherals which is different from at thisproblem,a power supply design method has been brought forward,which solves theorder of the large amount of image data that requires to be processed,the inter memory resources of F2812 can’t meet the for this point,this theme extends the outside memory according to the internal memory characters of the DSP chip. In addition,this theme gives the flow chart of the main program and the detail methods about the system’s software design and implement,including system’s initialization,data acquisition,analog to digital converter unit,data processing,data munication and code development flow of USB firmware is also introduced in this theme. Key words DSP。 USB 接 口 支 持 ( 低 速 )、 12MB/S( 全速 ) 和高達(dá)480MB/S( 規(guī)范 )的數(shù)據(jù)傳輸速率,扣除用于總線狀態(tài)、控制和錯(cuò)誤監(jiān)測(cè) xx 大學(xué)學(xué)士學(xué)位論文 2 等數(shù)據(jù)傳輸, USB 的最大理論傳輸速率仍達(dá) ,遠(yuǎn)高于一般的串行總線接口。本文的研 究主要包括以下幾個(gè)方面: 1. 對(duì) DSP 技術(shù)進(jìn)行廣泛的學(xué)習(xí)和研究,了解各系列的 DSP 的結(jié)構(gòu)及用途,根據(jù)課題需要選擇高性價(jià)比的主處理器,本課題選擇 TI 公司的TMS320F2812 作為主處理器,熟悉該款數(shù)字處理器的結(jié)構(gòu)、外設(shè)及各個(gè)模塊的功能和各個(gè)寄存器的作用及構(gòu)造。 根據(jù)系統(tǒng)各部分的功能的不同,可將系統(tǒng)分為輸入信號(hào)調(diào)理模塊、數(shù)字信號(hào)處理模塊和 USB 模塊。而 DSP 內(nèi)部采用的哈佛( Harvard)結(jié)構(gòu),它在片內(nèi)至少有四套總線;程序地址總線、程序數(shù)據(jù)總線、數(shù)據(jù) 的地址總線和數(shù)據(jù)的數(shù)據(jù)總線。器件上集成了多種先進(jìn)的外設(shè),代碼和指令與 F24x 系列數(shù)字信號(hào)的處理器完全兼容。若 F2812 芯片自帶的 ADC 模塊無(wú)法達(dá)到系統(tǒng)所要求的精度,則要采用外擴(kuò)模數(shù)轉(zhuǎn)換芯片的方案,而本系統(tǒng)對(duì)采樣精度要求達(dá)到 8位即可, F2812 芯片能夠滿足系統(tǒng)要求,在第三章第一節(jié)有詳細(xì)的介紹。該芯片有 2 種接口方式,設(shè)計(jì)時(shí)采用的是 Slave FIFO 方式,外部控制器( F2812)可以向?qū)ζ胀‵IFO 一樣對(duì) FX2 的多層緩沖 FIFO 進(jìn)行讀寫(xiě)。考慮到系統(tǒng)的低功耗以及 F2812 芯片的 CPU 核和 I/O 外設(shè)上 電順序的不同,本文選用了 TI 公司的芯片 TPS75733[18]和 TPS76801[19]作為整個(gè)系統(tǒng)的供電電源,將電路板外接的 +5V 轉(zhuǎn)換成 + 和 、 +12V 和 +5V 由外電源提供,這里選用開(kāi)關(guān)電源。當(dāng) ADS8364 的 /HOLDX( X 為 A、 B 或 C)保 持至少 20ms 的低電平時(shí),轉(zhuǎn)換開(kāi)始。 5. 快速轉(zhuǎn)換時(shí)間, ADC 時(shí)鐘可以配置為 25MHZ,最高采樣帶寬為 。此外為了方便觀察電源的通斷,在電源的輸入端設(shè)置了電源指示燈 LED,在 +5V 電源輸入時(shí)二極管 LED 將發(fā)光 [1819]。它有一個(gè)片內(nèi)鎖相環(huán)( PLL)電路,利用PLL 可以把 24MHz 振蕩器頻率倍頻至 480MHz 供收發(fā)器使用。 1 2 3 4 5 6ABCD654321DCBAT i t l eN um be r R e v i s i onS i z eBD a t e : 6 J un 200 9 S he e t of F i l e : D : \ P R O G R A M F I L E S \ P R O T E L 99S E \ E X A M P L E S \M yD e s i gn .dd bD r a w n B y :X 1/ X C K I NX2T M S 320 F 2812C130p FC230p FC122p FC222p F30M H z 24H M zX T A L I NX T A L O U TC Y 7C 680 13 xx 大學(xué)學(xué)士學(xué)位論文 19 1 2 3 4 5 6ABCD654321DCBAT i t l eN um be r R e v i s i onS i z eBD a t e : 6 J un 200 9 S he e t of F i l e : D : \ P R O G R A M F I L E S \ P R O T E L 99S E \ E X A M P L E S \M yD e s i gn .dd bD r a w n B y :R11KR210KS?S W 1C1 27μ F+ GNDR E S E T X R S 680 13281 2 圖 36 系統(tǒng)的復(fù)位電路 JTAG 電路設(shè)計(jì) 同單片機(jī)的應(yīng)