1、1 目录目录 1 1 绪论绪论 5 1.1 选题背景及意义 5 1.1.1 本课题的研究现状 5 1.1.2 选题目的及意义 6 1.2 设计任务及要求 6 1.2.1 设计的基本要求 7 1.2.2 本文结构安排 7 2 2 函数发生器系统设计函数发生器系统设计 . 8 2.1 设计方案的比较 8 2.2 系统模块设计 8 2.2.1 控制模块: 8 2.2.2 按键及其显示模块: 9 2.2.3 波形产生模块 9 2.2.4 D/A 转换 . 10 2.3 系统总体框图 . 11 2.4 理论分析 . 12 2.4.1 电路的理论计算 . 12 2.4.2 波形产生相关理论 . 14 2.
2、5 单片机软件开发系统 . 15 3 3 系统硬件电路的设计系统硬件电路的设计 17 3.1 单片机最小系统 . 17 3.2 单片机的接口电路 . 18 3.3 幅度控制模块 . 22 3.3.1 单片机与 DAC0832 的接口 . 22 3.3. 2DAC0832 与运放的连接 . 22 4 4 系统软件设计系统软件设计 25 4.1 系统软件设计方案 . 25 4.2 系统软件流程图 . 25 4.3 信号产生程序 . 26 4.3.1 正弦波产生 . 27 2 4.3.2 三角波产生 . 27 4.3.2 方波产生 . 28 4.3.4 锯齿波的产生 . 29 5 5 系统调试与测试
3、系统调试与测试 31 5.1 调试 . 31 5.2 测试 . 34 6 6 结论与展望结论与展望. 37 6.1 结论 . 37 6.2 展望 . 37 致致 谢谢 38 参考文献参考文献. 50 附附 录录 39 附录一 系统软件部分源程序 39 附录二 系统原理图 48 附录三 系统 PCB 图 49 3 基于单片机的波形发生器的设基于单片机的波形发生器的设计计 摘要:摘要:函数发生器是一种用于产生标准信号的电子仪器,它广泛用于工业生产、 科研和国防等各个领域中,所以论文选题具有一定的实用意义。 本文介在绍了函 数发生器的基本概念及原理的基础上,采用 AT89C51 单片机为核心,完成了
4、简易 的 DDS 函数发生器的硬件设计和软件编程, 并通过调试实现了其功能和主要技术 指标。在系统的硬件部分,设计了由单片机最小系统为核心、通过接口设计,扩 展了 DAC 转换模块、按键和 LED 显示模块。其中,采用两片 DAC0832 实现了全数 字化的频率合成器(简称 DDS)。系统的软件设计是在 keil uVision4 的集成开发 环境下,采用 C 语言完成了应用系统软件编程,包括主程序、产生四种常用信号 的程序、按键功能和显示子程序等电脑模块;模块化的编程使得程序具有可读性 和易于维护的特点。 关键词:关键词:信号发生器 单片机 keilc51 Based on SCM wave
5、form generator design 4 Abstract:Function generator is used to produce a standard signal electronic instrument, it is widely used in industrial production, scientific research and national defense, and other fields, so the thesis has certain practical significance. This paper in shaoxing interface t
6、he function generator of basic concepts and principles, and on the basis of the AT89C51 microcontroller as the core, the completion of the simple DDS function generator hardware design and software programming, and through the debugging realized its function and the main technical indexes. In the system hardware part, designed by single chip minimize system as the core, through the interface design, expanded the DAC conversion module, keys and LED display module. Among them, the two pieces of