【正文】
基于單片機的波形發(fā)生器 摘要本系統(tǒng)是基于AT89C51單片機的數(shù)字式低頻信號發(fā)生器。采用AT89C51單片機作為控制核心,外圍采用數(shù)字/模擬轉(zhuǎn)換電路(DAC0832)、運放電路(LM324)、按鍵和8位數(shù)碼管等。通過按鍵控制可產(chǎn)生方波、三角波、正弦波等,同時用數(shù)碼管指示其對應的頻率。其設計簡單、性能優(yōu)好,可用于多種需要低頻信號的場所,具有一定的實用性。各種各樣的信號是通信領域的重要組成部分,其中正弦波、三角波和方波等是較為常見的信號。在科學研究及教學實驗中常常需要這幾種信號的發(fā)生裝置。為了實驗、研究方便,研制一種靈活適用、功能齊全、使用方便的信號源是十分必要的。本文介紹的是利用AT89C51單片機和數(shù)模轉(zhuǎn)換器件DAC0832產(chǎn)生所需不同信號的低頻信號源,其信號幅度和頻率都是可以按要求控制的。文中簡要介紹了DAC0832數(shù)模轉(zhuǎn)換器的結(jié)構原理和使用方法,AT89C51的基礎理論,以及與設計電路有關的各種芯片。文中著重介紹了如何利用單片機控制D/A轉(zhuǎn)換器產(chǎn)生上述信號的硬件電路和軟件編程。信號頻率幅度也按要求可調(diào)。本次關于產(chǎn)生不同低頻信號的信號源的設計方案,不僅在理論和實踐上都能滿足實驗的要求,而且具有很強的可行性。該信號源的特點是:體積小、價格低廉、性能穩(wěn)定、實現(xiàn)方便、功能齊全。關鍵詞 :AT89C51 DAC0832 LM324 8位數(shù)碼管顯示AbstractWaveform The system is a digital signal generator based on single chip is used as a control microcontroller system is posed by digital/analog version(DAC0832), imply circuit,button and nixie can generate the square, triangle and sine wave,with nixie system can be used for a signal soure in the lowfrequency signal is very practical.Various signals are an important part of correspondent area. In this area, sine wave, triangle wave and square wave are mon signals. In science research and teaching experiment, we often need the occurrence equipment of these signals. In order to make the experiment and research easier, to develop a suitable, full functional and easily used signals source is essential.This paper introduces the low frequency sources of different signals that are produced by AT89C51 SCM and DAC0832. Its signal range and frequency can be controlled by requirement. This paper briefly introduces the structure principle and usage of DAC0832, the basic theory of AT89C51 and various chips which relevant to design circuit. this paper emphasized how to use SCM to control the hardware circuit and software program of the signals above which produced by DAC0832. The signal frequency range also can be adjusted by requirement.This signal source design plan concerns on producing different low frequency signals, not only meet the request of experiment in theory and in practice, but also have strong feasibility. The trait of this signal source is: small volume, low price, stable function, easily achievable, and full function.Keywords:AT89C51, DA0832, LM324, 8 nixie tube display目錄摘要 IAbstract II目錄 III前言 11 波形發(fā)生器概述 2 2 42 方案論證與比較 5 方案一 5 方案二 6 方案三 63 硬件原理 8 MCS51單片機的內(nèi)部結(jié)構 8 內(nèi)部結(jié)構概述 8 CPU結(jié)構 9 存儲器和特殊功能寄存器 10 P0P3口結(jié)構 11 時鐘電路和復位電路 11 11 12 DAC0832的引腳及功能 134 軟件原理 15 主流程圖 15 鋸齒波仿真圖 16 三角波仿真圖 17 方波仿真圖 19 正弦波仿真圖 20總結(jié) 22致謝 23參考文獻 24前言 波形發(fā)生器也稱函數(shù)發(fā)生器,作為實驗信號源,是現(xiàn)今各種電子電路實驗設計應用中必不可少的儀器設備之一。目前,市場上常見的波形發(fā)生器多為純硬件的搭接而成,且波形種類有限,多為鋸齒波,正弦波,方波,三角波等波形。信號發(fā)生器作為一種常見的應用電子儀器設備,傳統(tǒng)的可以完全由硬件電路搭接而成,如采用555振蕩