【正文】
7 設(shè)計(jì) (論文 )題目 基于單片機(jī)的信號發(fā)生器 摘要 信號發(fā)生器又稱信號源或振蕩器,在生產(chǎn)實(shí)踐和科技領(lǐng)域中有著廣泛的應(yīng)用。各種波形曲線均可以用三角函數(shù)方程式來表示。能夠產(chǎn)生多種波形,如三角波、鋸齒波、矩形波(含方波)、正弦波的電路被稱為函數(shù)信號發(fā)生器。函數(shù)信號發(fā)生器在電路實(shí)驗(yàn)和設(shè)備檢測中具有十分廣泛的用途。例如在通信、廣播、電視系統(tǒng)中,都需要射頻(高頻)發(fā)射,這里的射頻波就是載波,把音頻(低頻)、視頻信號或脈沖信號運(yùn)載出去,就需要能夠產(chǎn)生高頻的振蕩器。在工業(yè)、農(nóng)業(yè)、生物醫(yī)學(xué)等領(lǐng)域內(nèi),如高頻感應(yīng)加熱、熔煉、淬火 、超聲診斷、核磁共振成像等,都需要功率或大或小、頻率或高或低的振蕩器。 本文利用 AT89C51 單片機(jī)作為控制核心來設(shè)計(jì)信號發(fā)生器,通過程序設(shè)計(jì)的方法產(chǎn)生正弦波、方波、三角波,并在 Protues 電子設(shè)計(jì)平臺上對此方案進(jìn)行了仿真,得到與理論相應(yīng)的波形。通過 D/A 轉(zhuǎn)換器將數(shù)字信號轉(zhuǎn)換成模擬信號,最終由示波器顯示出來。通過按鍵來控制這幾種波形的類型選擇,而且可控制頻率的變化,在一定范圍內(nèi)波形的幅度和頻率可任意改變。本次設(shè)計(jì)消除了傳統(tǒng)信號發(fā)生器存在元器件分散性造成波形失真的缺陷,并且其設(shè)計(jì)簡單,價格低廉,產(chǎn)生的波形 穩(wěn)定,可用于多種需要低頻信號源的場合,實(shí)用性強(qiáng)。 【關(guān)鍵詞】 信號發(fā)生器 D/A 轉(zhuǎn)換 AT89C51 頻率 幅度 7 Abstract Signal generator is also known as signal source or oscillator, in the production practice and technology is widely used in the field of. Each kind of wave may use the trigonometric function equation. Can produce a variety of waveforms, such as the triangle wave, sawtooth wave, rectangular wave (including square wave ), sine wave circuit is called the function signal generator. Function signal generator in electric circuit experiment and the equipment examination has a very wide range of uses. For example, in munication, broadcasting, television system, needs the radio frequency ( HF) emission, the radio wave is the carrier, the audio frequency ( low frequency ), the video signal or pulse signal to carry out, will need to be able to produce the high frequency oscillator. In industry, agriculture, biomedical and other fields, such as highfrequency induction heating, smelting, quenching, ultrasound, magic resonance imaging, required power big or small, or high or low frequency oscillator. This paper design a signal generator, and AT89C51 is used as a control microcontroller core, It can generate sine wave, square wave, triangle wave through the method of program design , and the simulation by the puter soft ware Proteus is been done , and those results consistent with the theory. converting a digital signal into an analog signal through the D/A converter ,and ultimately displayed by the oscilloscope. Through the button to control the options of waveform types and can change frequency ,amplitude and frequency of the waveform can be arbitrarily changed within a certain range. The design eliminates the defect of waveform distortion which produced by the dispersion of the ponents which exist in the traditional signal generator. Its design is simple,inexpensive,stable and can be used in a variety of occasions that require low frequency signal source,it has practical value. 【 keywords】 Signal Generator D / A converter AT89C51 Frequency Margin 7 目錄 第一章 緒論 ..................................................................................................................... 4 課題研究的動態(tài)和意義 ........................................................................................... 4 單片機(jī)概述 ................................................................................................................ 4 信號發(fā)射器分類 ........................................................................................................ 4 設(shè)計(jì)任務(wù)和要求 ........................................................................................................ 5 第二章 方案的設(shè)計(jì)與選擇 ................................................................................................ 5 方案的比較 ............................................................................................................... 5 設(shè)計(jì)原理 ................................................................................................................... 5 設(shè)計(jì)功能 ................................................................................................................... 6 第三章 主要電路元器件介紹 ............................................................................................ 6 AT89C51 單片機(jī)簡介 ................................................................................................ 6 DAC0832 簡介 ............................................................................................................ 8 第四章 硬件實(shí)現(xiàn)和 單元電路設(shè)計(jì) .................................................................................... 9 硬件原理框圖 ........................................................................................................... 9 復(fù)位電路 ................................................................................................................. 10 D/A 轉(zhuǎn)換電路 ...........................................................................................................11 按鍵接口電路 ......................................................................................................... 12 時鐘模塊設(shè)計(jì) ......................................................................................................... 12 顯示模塊設(shè)計(jì) ......................................................................................................... 13 第五章 軟件設(shè)計(jì) ............................................................................................................ 14 程序流程圖 ............................................................................................................. 14 初始化程序 .............................................................................................................. 15 鍵掃描程序 .............................................................................................................. 15 波形產(chǎn)生程序 .......................................................................................................... 16 波形仿真 .................................................................................................................. 17 第六章安裝調(diào)試和問題解決 ............................................................................................ 21 調(diào)試過程 ...............................................................................