【正文】
編號(hào): 畢業(yè)設(shè)計(jì)說(shuō)明書 題 目: 基于 AVR單片機(jī)多功能 函數(shù)發(fā)生器的設(shè)計(jì) 院 (系): 電子工程學(xué)院 專 業(yè): 測(cè)控技術(shù)與儀器 學(xué)生姓名: 學(xué) 號(hào): 指導(dǎo)教師: 職 稱: 題目類型: 理論研究 實(shí)驗(yàn)研究 工程設(shè)計(jì) √ 工程技術(shù)研究 軟件開發(fā) 2020 年 5 月 18 日 XXXXX 大學(xué)畢業(yè)設(shè)計(jì)(論文)報(bào)告 第 1 頁(yè) 共 4 頁(yè) 摘要 多功能函數(shù)發(fā)生器即信號(hào)發(fā)生器,是一種常用的的信號(hào)源,廣泛地應(yīng)用于電子電路、自動(dòng)控制系統(tǒng)和教學(xué)實(shí)驗(yàn)領(lǐng)域。目前使用的信號(hào)發(fā)生器大部分是函數(shù)信號(hào)發(fā)生器,其中特殊波形發(fā)生器價(jià)格昂貴。因此采用直接數(shù)字頻率合成技術(shù)來(lái)實(shí)現(xiàn)函數(shù)發(fā)生器,成本較低,具有較高的研究?jī)r(jià)值。 本設(shè)計(jì)是以 AVR 單片機(jī)( M64)為核心器件,用 R2R 電阻網(wǎng)絡(luò)設(shè)計(jì) D/A 轉(zhuǎn)換器,使其具有可 以產(chǎn)生三角波、方波、正弦波的函數(shù)發(fā)生器,波形可以進(jìn)行調(diào)頻和調(diào)幅,而調(diào)頻主要是用軟件的方法實(shí)現(xiàn) DDS 的算法,從而達(dá)到改變頻率的目的。并用 4 4 矩陣鍵盤來(lái)選擇各種波形的輸出和頻率的設(shè)置,以及用 TG12864 液晶來(lái)顯示選擇的波形、頻率和幅度。 系統(tǒng)實(shí)現(xiàn)了方波,三角波和正弦波的輸出,頻率范圍為 200~1MHz,幅度為 0~5V。系統(tǒng)穩(wěn)定,容易調(diào)試,成本較低,具有一定的使用價(jià)值。 關(guān)鍵詞 : AVR 單片機(jī); R2R 網(wǎng)絡(luò); TG12864 液晶; DDS 算法; XXXXX 大學(xué)畢業(yè)設(shè)計(jì)(論文)報(bào)告 第 2 頁(yè) 共 4 頁(yè) Abstract As we know, a multifunction generator is a signal generator, and it is a mon signal source, which is widely used in the field of electronic circuits, controlling systems, and teaching experiments. Most of the currently signal generator is the function signal generator is very expensive. Therefore, the function generator uses the direct digital frequency synthesis technology which the cost is low and of high value. Bases on AVR microcontroller , as the core device, the design makes of the the sine wave function generator by using the R2R resistor work to form the D/ it can generate the triangle wave, the square wave, waveform frequency and amplitude which can be achieve the purpose of changing frequency, it uses the software method to implement the algorithm of DDS. The 4 4 matrix keyboard to select the output of various waveforms and the frequency setting, using TG12864 LCD to display the waveforms ,selecting frequency and amplitude. Finally, this system has the implementation of the output of square wave, the triangular wave and the sine wave. The frequency range from 200Hz to 1MHz,from 0 to 5V in we can drop the conclusion that the system is easy adjusting,low cost and of high value. Key words: AVR microcontroller; R2R Network; TG12864 LCD; DDS algorithm; XXXXX 大學(xué)畢業(yè)設(shè)計(jì)(論文)報(bào)告 第 3 頁(yè) 共 4 頁(yè) 目 錄 引言 ...............................................................................................................1 1 本課題要研究解決的問(wèn)題 ......................................................................3 畢業(yè)設(shè)計(jì)(論文)的要求與數(shù)據(jù) .................................................................................... 3 2 系統(tǒng)設(shè)計(jì)方案 ........................................................................................3 基本設(shè)計(jì)原理 .................................................................................................................... 3 單片機(jī) ATmega64 的簡(jiǎn)介 ................................................................................................ 4 電源模塊設(shè)計(jì) .................................................................................................................... 7 鍵盤模塊設(shè)計(jì) .................................................................................................................... 7 顯示模塊 ............................................................................................................................ 8 D/A 轉(zhuǎn)換部分 ..................................................................................................................... 8 D/A 轉(zhuǎn)換器的主要性能指標(biāo) .............................................................................................. 9 A/D 轉(zhuǎn)換器說(shuō)明 ............................................................................................................... 10 3 硬件電路 .............................................................................................. 11 硬件設(shè)計(jì)原則 ...................................................................................................................11 系統(tǒng)各硬件電路 .............................................................................................................. 12 電源電路 ......................................................................................................................... 12 時(shí)鐘電路 ......................................................................................................................... 12 復(fù)位電路 ......................................................................................................................... 13 鍵盤電路 ......................................................................................................................... 13 顯示電路 ......................................................................................................................... 13 D/A 轉(zhuǎn)換電路 ................................................................................................................. 15 A/D 轉(zhuǎn)換模塊 ................................................................................................................. 16 濾波器模塊的設(shè)計(jì) ......................................................................................................... 17 系統(tǒng)硬件電路的抗干擾措施 ......................................................................................... 18 4 DDS 技術(shù)分析 ...................................................................................... 19 DDS 的基本工作原理 ....................................................................................................... 19 5 軟件設(shè)計(jì) ................................................................................................ 22 應(yīng)用軟件設(shè)計(jì)原則 ........................................................................................................... 22 編程語(yǔ)言的選擇 ...........................................