基于avr单片机多功能函数信号发生器.doc
基于avr单片机多功能函数信号发生器,基于avr单片机多功能函数信号发生器基于mega16和dds9850的函数发生器的设计包含原理图和pcb设计1.2万字原创论文摘要多功能函数发生器即信号发生器,是一种常用的的信号源,广泛地应用于电子电路、自动控制系统和教学实验领域。目前使用的信号发生器大部分是函数信号发生器,其中特殊波形发生器价格昂贵。因此采用直接数字...
![](http://img.queshao.com/images/pcgzh.gif)
![](http://preview.queshao.com/tobuy/111827.gif)
内容介绍
此文档由会员 totti19870817 发布基于AVR单片机多功能函数信号发生器
基于mega16和dds9850的函数发生器的设计
包含原理图和PCB设计
1.2万字
原创论文
摘要
多功能函数发生器即信号发生器,是一种常用的的信号源,广泛地应用于电子电路、自动控制系统和教学实验领域。目前使用的信号发生器大部分是函数信号发生器,其中特殊波形发生器价格昂贵。因此采用直接数字频率合成技术来实现函数发生器,成本较低,具有较高的研究价值。
本设计是以AVR单片机(M64)为核心器件,用R2R电阻网络设计D/A转换器,使其具有可以产生三角波、方波、正弦波的函数发生器,波形可以进行调频和调幅,而调频主要是用软件的方法实现DDS的算法,从而达到改变频率的目的。并用4×4矩阵键盘来选择各种波形的输出和频率的设置,以及用TG12864液晶来显示选择的波形、频率和幅度。
系统实现了方波,三角波和正弦波的输出,频率范围为200~1MHz,幅度为0~5V。系统稳定,容易调试,成本较低,具有一定的使用价值。
关键词: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 毕业设计(论文)的要求与数据 3
2 系统设计方案 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 系统各硬件电路 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系统硬件电路的抗干扰措施 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算法实现改变频率的思路 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 系统中存在的问题、解决办法和展望 32
谢 辞 33
参考文献 34
附录 35
附录一 PCB图 35
附录二 电路原理图 36
附录三 原代码 37