基于avr單片機多功能函數(shù)信號發(fā)生器.doc
基于avr單片機多功能函數(shù)信號發(fā)生器,基于avr單片機多功能函數(shù)信號發(fā)生器基于mega16和dds9850的函數(shù)發(fā)生器的設計包含原理圖和pcb設計1.2萬字原創(chuàng)論文摘要多功能函數(shù)發(fā)生器即信號發(fā)生器,是一種常用的的信號源,廣泛地應用于電子電路、自動控制系統(tǒng)和教學實驗領域。目前使用的信號發(fā)生器大部分是函數(shù)信號發(fā)生器,其中特殊波形發(fā)生器價格昂貴。因此采用直接數(shù)字...


內容介紹
此文檔由會員 totti19870817 發(fā)布基于AVR單片機多功能函數(shù)信號發(fā)生器
基于mega16和dds9850的函數(shù)發(fā)生器的設計
包含原理圖和PCB設計
1.2萬字
原創(chuàng)論文
摘要
多功能函數(shù)發(fā)生器即信號發(fā)生器,是一種常用的的信號源,廣泛地應用于電子電路、自動控制系統(tǒng)和教學實驗領域。目前使用的信號發(fā)生器大部分是函數(shù)信號發(fā)生器,其中特殊波形發(fā)生器價格昂貴。因此采用直接數(shù)字頻率合成技術來實現(xiàn)函數(shù)發(fā)生器,成本較低,具有較高的研究價值。
本設計是以AVR單片機(M64)為核心器件,用R2R電阻網絡設計D/A轉換器,使其具有可以產生三角波、方波、正弦波的函數(shù)發(fā)生器,波形可以進行調頻和調幅,而調頻主要是用軟件的方法實現(xiàn)DDS的算法,從而達到改變頻率的目的。并用4×4矩陣鍵盤來選擇各種波形的輸出和頻率的設置,以及用TG12864液晶來顯示選擇的波形、頻率和幅度。
系統(tǒng)實現(xiàn)了方波,三角波和正弦波的輸出,頻率范圍為200~1MHz,幅度為0~5V。系統(tǒng)穩(wěn)定,容易調試,成本較低,具有一定的使用價值。
關鍵詞:AVR單片機; R2R網絡; TG12864液晶; DDS算法;
Abstract
As we know, a multi-function generator is a signal generator,and it is a common 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.Waveform 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 network to form the D/A.So it can generate the triangle wave, the square wave, waveform frequency and amplitude which can be changed.To 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 amplitude.So 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;
目 錄
引言 1
1 本課題要研究解決的問題 3
1.2 畢業(yè)設計(論文)的要求與數(shù)據(jù) 3
2 系統(tǒng)設計方案 3
2.1 基本設計原理 3
2.2 單片機ATmega64的簡介 4
2.3 電源模塊設計 7
2.4 鍵盤模塊設計 7
2.5 顯示模塊 8
2.6 D/A轉換部分 8
2.7 D/A轉換器的主要性能指標 9
2.8 A/D 轉換器說明 10
3 硬件電路 11
3.1 硬件設計原則 11
3.2 系統(tǒng)各硬件電路 12
3.2.1電源電路 12
3.2.2時鐘電路 12
3.2.3復位電路 13
3.2.4鍵盤電路 13
3.2.5顯示電路 13
3.2.6 D/A轉換電路 15
3.2.7 A/D轉換模塊 16
3.2.8濾波器模塊的設計 17
3.2.9系統(tǒng)硬件電路的抗干擾措施 18
4 DDS技術分析 19
4.1 DDS的基本工作原理 19
5 軟件設計 22
5.1 應用軟件設計原則 22
5.2 編程語言的選擇 23
5.3 軟件設計總流程圖 23
5.4 程序設計的整體思路 24
5.4.1DDS算法實現(xiàn)改變頻率的思路 24
5.4.2液晶驅動程序設計的概括 24
5.4.3鍵盤掃描程序設計 24
6 調試過程 26
6.1 硬件調試 26
6.2 軟件調試 26
7 測試結果 27
8 總結及展望 32
8.1全文總結 32
8.2 系統(tǒng)中存在的問題、解決辦法和展望 32
謝 辭 33
參考文獻 34
附錄 35
附錄一 PCB圖 35
附錄二 電路原理圖 36
附錄三 原代碼 37