【正文】
s passband, passband more hours, it is difficult to achieve squarewave requirements, so we chose the frequency performance was good OPA820 opamp. Front generated for square can39。 Oscillation period for. Through calculating formula by cycle that change, C, R1 ifss can be obtained with R2 ratio required pulse frequency. But this several variables in actual circuit will be some constraints, in choosing device parameters through actual adjustment should be determined. Select devices, it is suggested that resistance, so that circuit using metal film resistors the heat generated by the noise is small。 And pared with mixedsignal circuit pure analog circuits to plex, therefore, in this the paper only with analog circuits to generate square wave. The basic principle is: through the voltage parator produce high level。Phase Position Shift 1 waveform synthesis system overview This is designed to simulate the process of signal synthesis. For a square wave signal by Fourier series spread knowable, it can depose the amplitude of the more specific for unlimited odd harmonics, so in turn as long as infinite multiple odd harmonic ponent, the amplitude and the harmonic proportion in a particular superposition, also will certainly get a square wave signal. This paper is the simulated the base wave and three harmonic harmonic ponent synthesis process of square wave signal. Theoretically speaking, the harmonic ponents, synthetic waveform will more close to the standard square bobo shape. This system begin with a square wave oscillator to generate a frequency of 60KHz pulse signal, again into separate frequency device 10KHz to get a frequency for handling of square wave signal and a frequency of square wave signal for 30KHz, then respectively through the filter processing for the sine signal and 30KHz 10KHz to closespaced 10KHz sine wave as base wave 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 36頁(yè) 共 46頁(yè) ponent, 30KHz sine wave as three times, through modulation circuit harmonics of adjust them respectively in fengfeng value, can satisfy 2V 6V and Fourier series spread coefficient ratio。Sinusoidal Wave。 } } 附錄二:英文原文 The Analysis and Design of Waveform Generator Xue lian ,Wang Fan ,Zheng Jinfa Engineering and Commerce College, SouthCentral University for Nationalities, Wuhan Hubei 430065 Abstract: In this paper, the sinusoidal waves in different frequency were synthesized into square wave according to the method of Fourier series. Firstly, the needed sinusoidal waves were achieved through the square wave generation circuit, the frequency division circuit and the filter circuit。 //disbuf[3]=4。 //disbuf[2]=3。 //disbuf[1]=2。 //disbuf[0]=1。 uiResult=bb。 uiResult=bb。 bb=aa*1000。 aa=uiResult。 OE=1。 OE=0。 EOC=1。 START=0。 START=0。 OE=1。 } } void main() { 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 34頁(yè) 共 46頁(yè) START=0。 delay2ms()。 P0=LEDcode[disbuf[dispcount]]。dispcount4。 delay2ms()。 P0=LEDcode1[disbuf[0]]。j)。i++) for(j=256。 for(i=2。 float aa,bb。 //unsigned char channel=0xfd。 sbit OE=P3^0。 unsigned char dispcount。 unsigned char code LEDcode1[]={0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd,0x87,0xff,0xef}。 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 32頁(yè) 共 46頁(yè) 附錄 附錄一:信號(hào)采集顯示程序 include unsigned char code dispbitcode[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}。 在整個(gè)制作過程中我還要感謝朱雷老師,由于 AD637 這塊片子比較貴, 在我沒 有辦法找到這塊片子的時(shí)候是他借給了我。老師做事的那種熱情讓我深感震撼,使我也很有熱情地投入到我的課題中去。 在電路設(shè)計(jì)中采用模塊設(shè)計(jì)法,對(duì)各電路模塊進(jìn)行單獨(dú)設(shè)計(jì)和測(cè)試,最后將各模塊組合后進(jìn)行整體測(cè)試單片機(jī)軟件可先在 Proteus 軟件中調(diào)試,再與硬件系統(tǒng)聯(lián)調(diào)。 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 29頁(yè) 共 46頁(yè) 結(jié)束語 經(jīng)過 2 個(gè)多月 的奮斗,組成的系統(tǒng)能夠得到滿足要求的 10 kHz、 30 kHz 的正弦信號(hào),并具有確定的相位,滿足 6V和 2V 的幅值要求;實(shí)現(xiàn)把 10 kHz 和 30 kHz 合成為一近似方波,并滿足幅值為 5V; 并且把 50KHz 的方波分頻出來再通過濾波器變換成了正弦波, 實(shí)現(xiàn)對(duì)各個(gè)正弦信號(hào)的幅度進(jìn)行測(cè)量,并把誤差控制在? 5%. 本設(shè)計(jì)以多功能、低功耗、操作方便、結(jié)構(gòu)簡(jiǎn)單、易于調(diào)試為主要設(shè)計(jì)原則。 ( 4) 加法電路 輸出波形 測(cè)試 : 為了更加了解電路,并 測(cè)試電路參數(shù)的合理性 ,做了 10 kHz、 30 kHz 的合成波; 10 kHz、 30 kHz、 50 kHz 的合成波; 10 kHz、 30 kHz、 50 kHz 合成 三角波的理論與測(cè)試的 比較: ○110 kHz、 30 kHz 合成 方波 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 28頁(yè) 共 46頁(yè) 圖 131 10 kHz、 30 kHz 合成波 — 仿真(左)測(cè)試(右) 從圖 131可以看出 10 kHz、 30 kHz 兩個(gè)正弦信號(hào)合成的方波與仿真結(jié)果相似; 但是遺憾的是由于最后做到 5次諧波時(shí)波形出現(xiàn)了毛刺和失真,我努力克服但是越做到最后由于是模擬電路就出現(xiàn)了振蕩。 ( 3) 濾波電路輸出波形測(cè)試,以 10 kHz 為例,波形如下: 為了更加了解濾波電路的性能,和測(cè)試電路參數(shù)的合理性,以 10 kHz方波信號(hào)為例,把仿真波形與測(cè)試波形比較。 ( 2) 10 kHz、 30 kHz 、 50 kHz 諧波 幅值 測(cè)試 為了更加熟悉電路特性,對(duì)電路輸出波形的幅值進(jìn)行簡(jiǎn)單測(cè)試,測(cè)試結(jié)果見下表: 表 1 10 kHz、 30 kHz 、 50 kHz 幅值測(cè)試與誤差 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 27頁(yè) 共 46頁(yè) 頻率( kHz) 理論 值( V) 測(cè)試值( V) 顯示值( V) 誤差( %) 10 6 30 2 50 從表 1中的數(shù)據(jù)可以看出,測(cè)得的各正弦信號(hào)的幅值,其 顯示值與測(cè)試值的誤差不大于 ?5% 。 測(cè)試結(jié)果 ( 1) 方波振蕩電路, 采用 6MHz 晶振等組成,為后級(jí)電路提供方波信號(hào)。 (二)軟件設(shè)計(jì) 開 始系 統(tǒng) 初 始 化給 正 確 時(shí) 序A D 采 集將 采 集 到 的 信號(hào) 傳 給 P 1 口單 片 機(jī) 處 理 采集 到 的 信 號(hào) 在數(shù) 碼 管 上 顯 示 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 26頁(yè) 共 46頁(yè) 圖 21 系統(tǒng)軟件流程 本系統(tǒng)的軟件部分的主要功能是:配合有效值檢波器、 ADC0809 模數(shù)轉(zhuǎn)換電路和 AT89C51 來完成對(duì)前面濾波器出來的模擬信號(hào)的大小的顯示,由于有效值檢波器出來的信號(hào)只是有效值,最后到單片機(jī)的數(shù)字信號(hào)也是采集到的有效值,所以還要顯示被測(cè)波形的峰峰值還需要通 過單片機(jī)內(nèi)部進(jìn)行換算后再傳遞到數(shù)碼管進(jìn)行顯示。此時(shí),被外部拉低的 P3 口將用上拉電阻輸出電流 ( IIL)。 P3 口輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流) 4 個(gè) TTL 邏 輯門電路。 江蘇技術(shù)師范學(xué)院畢業(yè)設(shè)計(jì)(正文) 第 25頁(yè) 共 46頁(yè) Flash 編程或校驗(yàn)時(shí), P2 亦接收高位地址和一些控制信號(hào)。 在訪問外部程序存儲(chǔ)器或 16 位地址的外部數(shù)據(jù)存儲(chǔ)器(例如執(zhí)行MOVX DPTR 指令)時(shí), P2 口送出高 8 位地址數(shù)據(jù)。 表 . 和 的第二功能 P2 口 P2 是一個(gè)帶有內(nèi)部上拉電阻的 8 位雙向 I/O 口, P2 的輸出緩沖級(jí)可驅(qū)動(dòng)(吸收或輸出電流) 4 個(gè) TTL 邏輯 門電路。 與 AT89C51 不同之處是, 和 還可分別作為定時(shí) /計(jì) 數(shù)器 2 的外部計(jì)數(shù)輸入( )和輸入( ), 參見表 1。對(duì)端口寫 “1”,通過內(nèi)部的上拉電阻把端口拉到高電平,此時(shí)可作輸入口。 在 Flash 編程時(shí), P0 口接收指令字節(jié),而在程序校驗(yàn)時(shí),輸出指令字節(jié),校驗(yàn)時(shí),要求外接上拉電阻。作為輸出口用時(shí),每位能吸收電流的 方式驅(qū)動(dòng) 8 個(gè) TTL 邏輯門電路,對(duì)端口 P0 寫 “1”時(shí),可作為高阻抗輸入端用。 P0~P3 為可編程通用 I/O 腳,其功能用途由軟件定義,在本設(shè)計(jì)中, P0 端口( 32~39 腳)被定義為 N1 功能控制端口,分別與 N1 的相應(yīng)功能管腳相連接, 13 腳定義為 IR 輸入端 , 10 腳和 11 腳定義為 I2C 總線控制端口,分別連接 N1 的SDAS( 18 腳)和 SCLS( 19 腳)端口, 12 腳、 27 腳及 28 腳定義為握手信號(hào)功能端口,連接主板 CPU 的相應(yīng)功能端,用于當(dāng)前制式的檢測(cè)及會(huì)聚調(diào)整狀態(tài)進(jìn)入的控制功能。 RS