【正文】
文) 第 24頁 共 46頁 P0 口是一組 8 位漏極開路型雙向 I/O 口, 也即地址 /數(shù)據(jù)總線復(fù)用口。 在訪問外部數(shù)據(jù)存儲(chǔ)器或程序存儲(chǔ)器時(shí),這組口線分時(shí)轉(zhuǎn)換地址(低 8 位)和數(shù)據(jù)總線復(fù) 用,在訪問期間激活內(nèi)部上拉電阻。 P1 口 P1 是一個(gè)帶內(nèi)部上拉電阻的 8 位雙向 I/O 口, P1 的輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流) 4 個(gè) TTL 邏輯 門電路。作輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉 電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流 (IIL)。 Flash 編程和程序校驗(yàn)期間, P1 接收低 8 位地址。對(duì)端口 P2 寫 “1”,通過內(nèi)部的上拉電阻把端口拉到高電平,此時(shí)可作輸入口,作輸入口使用時(shí),因?yàn)閮?nèi)部存在上拉電阻,某個(gè)引腳被外部信號(hào)拉低時(shí)會(huì)輸出一個(gè)電流 (IIL)。在訪問 8 位地址的外部數(shù)據(jù)存儲(chǔ)器(如執(zhí)行 MOVX RI 指令)時(shí), P2 口輸出 P2 鎖存器的內(nèi)容。 P3 口 P3 口是一組帶有內(nèi)部上拉電阻的 8 位雙向 I/O 口。對(duì) P3 口寫入 “1”時(shí),它們被內(nèi)部上拉電阻拉高并可作為輸入端口。 P3 口除了作為一般的 I/O 口線外,更重要的用途是它的第二功能 P3 口還接收一些用于 Flash 閃速存儲(chǔ)器編程和程序校驗(yàn)的控制信號(hào)。 本系統(tǒng)的軟件不是特別復(fù)雜,詳細(xì)程序見附錄,整個(gè)軟件要完成的只是一個(gè)顯示濾波出來波形大小的功能, 四 、理論與測(cè)試 測(cè)試方法 先進(jìn)行各個(gè)模塊測(cè)試,在每個(gè)模塊都能完成各自的指標(biāo)時(shí) 然后再把整個(gè)系統(tǒng)連接 起來,接通電源, 調(diào)節(jié)電路, 直到達(dá)到指標(biāo)要求, 這樣提高了測(cè)試效率。其仿真與測(cè)試結(jié)果如下 : 圖 22 方波仿真(左)測(cè)試(右) 從圖 22可知,振 蕩電路的測(cè)試結(jié)果與 仿真結(jié)果比較符合。 由于在最后的調(diào)試時(shí)濾波出來的 50K 的信號(hào)波形不是很好,存在毛刺和失真所以最后沒有加入顯示的行列,也沒有對(duì) 5 次諧波進(jìn)行合成。 圖 23 10 kHz 濾波 — 仿真(左)測(cè)試(右) 從圖 23中可以看出, 10 kHz 方波信號(hào)經(jīng)過濾波電路 ,轉(zhuǎn)換后的正弦信號(hào)與仿真結(jié)果比較符合,說明濾波電路的參數(shù)設(shè) 置比較合理。 ○210 kHz、 30 kHz、 50 kHz 合成三角波 圖 133 10 kHz、 30 kHz 合成三角波 — 仿真(左)測(cè)試(右) 從圖 13 13 133三幅圖中,可以看出 10 kHz、 30 kHz 兩個(gè)正弦信號(hào)合成的方波與仿真結(jié)果相似; 10 kHz、 30 kHz、 50 kHz 三個(gè)正 弦信號(hào)合成的方波與仿真結(jié)果相似; 10 kHz、 30 kHz、 50 kHz 三個(gè)正弦信號(hào)合成的三角波與仿真結(jié)果相似。在系統(tǒng)設(shè)計(jì)過程中,力求硬件電路簡(jiǎn)單,充分發(fā)揮軟件編程方便靈活的特點(diǎn),并最大限度挖掘單片機(jī)片內(nèi)資源,來滿足系統(tǒng)設(shè)計(jì)要求。 但是遺憾的是由于最后做到 5次諧波時(shí)波形出現(xiàn)了毛刺和失真,我努力克服但是越做到最后由于是模擬電路就出現(xiàn)了振蕩,我不會(huì)放棄雖然在本次課題研究中沒能解決但是在今后的學(xué)習(xí)工作中我 還會(huì)繼續(xù)研究 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 30頁 共 46頁 參考文獻(xiàn) 1] Paul .福州:福建科學(xué)技術(shù)出版社, 2020 [ 2]黃爭(zhēng),李琰 .運(yùn)算放大器應(yīng)用手冊(cè) .北京:電子工業(yè)出版社, 2020 [ 3]張明金 .電工基礎(chǔ) .北京:北京師范大學(xué)出版社, 2020 [ 4]童詩白,華成英 .模擬電子技術(shù)基礎(chǔ) .北京:高等教育出版社, 2020 [5] 黃志偉 .全國大學(xué)生電子設(shè)計(jì)競(jìng)賽系統(tǒng)設(shè)計(jì) [M].北京:北京航空航天大學(xué)出版社, 2020. [6] 張友德 .單片微型機(jī)原理、應(yīng)用與試驗(yàn) [M].上海:復(fù)旦大學(xué)出版社, 2020. [7] 高吉祥 .全國大學(xué)生電子設(shè)計(jì)競(jìng)賽培訓(xùn)系列教程 [M].北京:電子工業(yè)出版社, 2020. [8] 蕭奮洛 .嵌入式邏輯分析儀的設(shè)計(jì)與實(shí)現(xiàn) [J].世界電子元器件 ,2020,( 10): 7883. [9] 劉新 .淺談邏輯分析儀 [J].計(jì)量與測(cè)試技術(shù) ,2020, 33( 3): 1720. [10]王景存.用 FPGA實(shí)現(xiàn)數(shù)字邏輯分析儀設(shè)計(jì) [J].武漢科技大學(xué)學(xué)報(bào),2020,( 32): 298300. [11]孔冬蓮 .基于示波器的簡(jiǎn)易邏輯分析儀設(shè)計(jì) [J].鄂州大學(xué)學(xué)報(bào),江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 31頁 共 46頁 2020,( 3): 89. [12]陸 綺榮 .基于雙 CPU邏輯分析儀的設(shè)計(jì)與實(shí)現(xiàn) [J].儀器儀表學(xué)報(bào),2020,( 2): 209212. [13]繆毅 .微機(jī)數(shù)據(jù)發(fā)生器與邏輯分析儀構(gòu)成的現(xiàn)代數(shù)字測(cè)試系統(tǒng) [J].無線電工程, 1992,( 06): 2325. [14] Peter van Roy. Challenges in developing useful and practical static analysis for logic programs[J].lecture Notes in Computer Science,1993(724):111. [15]. Combined means of signaturelogic analysis[J].Measurement Techniques, 1996, 39(5):561564. 致 謝 在本次畢業(yè)設(shè)計(jì)的進(jìn)行過程中,我得到了很多人的幫助,在此表示衷心的感謝 ! 首先要感謝李月紅指導(dǎo)老師的悉心指導(dǎo),指導(dǎo)老師幫助我開拓思路,鼓勵(lì)我做好課題。 創(chuàng)新實(shí)驗(yàn)室的同學(xué)也不時(shí)地幫助我,并且共同 營造了良好的學(xué)習(xí)和討論環(huán)境。 我還要感謝電信學(xué)院實(shí)驗(yàn)室中心提供的良好的科研環(huán)境和測(cè)試條件,感謝學(xué)校圖書館提供的相關(guān)資料。 unsigned char code LEDcode[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00}。 unsigned char disbuf[8]={0,0,0,0,10,10,10,10}。 sbit START=P3^1。 sbit EOC=P3^2。 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 33頁 共 46頁 unsigned int uiResult。 void delay2ms(void) { unsigned char i,j。i0。j0。 } void Display() { P2=0xff。 P2=dispbitcode[0]。 for(dispcount=1。dispcount++) { P2=0xff。 P2=dispbitcode[dispcount]。 P2=0xff。 P2=0xff。 while(1) { // P0=channel。 START=1。 P1=0xff。 while(EOC==0)。 uiResult=P1。 //uiResult=(uiResult*100)/51。 aa=((aa*5)/255)。 if(bb1500) { bb=bb*。 } else { bb=bb*。 } 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 35頁 共 46頁 disbuf[0]=uiResult/1000。 disbuf[1]=(uiResult/100)%10。 disbuf[2]=(uiResult/10)%10。 disbuf[3]=uiResult%10。 Display()。 then, after the sinusoidal waves’ phase position were shifted and synthesized, the square wave was generated. This circuit in this method was more cheaper than other circuits (eg: DDS). Keywords: Waveform Generator。 Filter。 Put the sine signals into 10KHz to phase shifter phase adjuster, and after 30KHz sinusoidal signal together into addition circuit synthesis, namely plete signal stack. It can be inferred that the output signal is adder an approximate squarewave signal, and frequency for probably 10KHz. System unit circuit as shown in figure 1 below. Figure 1 system structure diagram 2 the hardware circuit design square wave generating circuit design According to the above analysis, the 60kHz should be produced for pulse frequency. Square wave can use digital circuit generation, also can use analog circuits produce. As digital circuits produce waveform amplitude, needs to be smaller using simulated circuit to amplify。 Through the feedback loop and delay link to the electric frequency periodically height variations. Principle chart as figure2shows, diagram hysteretic parator output voltage, threshold voltage。 Choose opamp should consider when it39。t use, this latter stage, still need to pass the followup processing, should first except negative voltage isolation, here with a diode, so after diode for the voltage after subtracting tube voltage half before diode pressure drop. Thus square wave amplitude will more small, in order to achieve the minimum separate frequency circuit requirements, should be the voltage waveforms were pressurization. In proportion with pressor circuit USES amplifier, get the voltage amplitude moderate. Then after the voltage level for use, but in order to reduce load after each level circuit, the influence of wavelet produce circuit with load ability raise circuit, finally take a shot extremely follow device. To this, square wave generator can be expected to reach, could plug in the latter stage circuit. 方波發(fā)生電路 分頻 電路 濾波 電路 10Khz調(diào)幅 30KHz 調(diào)幅 移相 電路 加法 電路 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 37頁 共 46頁 U1O P A 8 4 2 I D32 476R11kΩR21kΩR31kΩ R410kΩK e y = A50%R5220ΩC21 0 n FD1 1 N 4 7 2 8 AD2 1 N 4 7 2 8 AD31 N 4 0 0 74053216 Uo Figure 2 square wave g