1、 XXXXX 学院 本科毕业设计(论文) 题 目 基于单片机的波形 发生器的设计 学生姓名 XXXXX 专业班级 电子科学与技术 1 班 学 号 XXXXX 院 (系) 电气工程学院 指导教师 (职称 ) XX(教授) XX(硕研(讲师) 完成时间 2012 年 5 月 15 日 基于单片机的 波形发生器 的设计 I 基于单片机的波形发生器的设计 摘 要 本文介绍了一种基于单片机的波形发生器的设计,整个系统通过单片机STC89C52 控制 DAC0832 实现将 8 位数字量转化成正弦波、方波、三角波、锯齿波和脉冲波五种波形的模拟量 的 输出 。 该波形发生器主要由两部分组成:系统硬件设计和系
2、统软件设计, 在系统 硬件设计中,以 STC89C52 单片机为核心,通过 I/O 接口设计,扩展了 D/A 转换模块、 波形选择按键、并行输入串行输出模块 74LS165 和 LCD1602 频率 、 幅度显示模块。 并且 采用单片机仿真软件PROTEUS7.5,设计并制作波形发生器的印制电路板( PCB) 。 系统软件设计是在 WAVE6000 的集成开发环境下采用汇编语言完成 的 , 包括主程序、四 种波形产生子程序、按键功能子程序和显示子程序等模块。 本系统可以实现 波形 频率 、 幅度实时可调,功能灵活,系统的开发成本在百元内,具有测量精度高,误差小、功耗低,数据传输速度较快,可靠性
3、高等特点,有一定的开发价值。 实验表明,设计系统的测试结果与实际波形的频率和幅 度一致。 关键词 波形发生器 /STC89C52/LCD1602/DAC0832 基于单 片机的 波形发生器 的设计 II THE DESIGN OF WAVEFORM GENERATOR BASED ON SINGLE-CHIP MICROCONTROLLER ABSTRACT This article describes the the design of the waveform generator based on single-chip, the entire system through the mic
4、rocontroller STC89C52 controls the DAC0832 that can finish convertting eight digital into the five waveform analog output of sine wave, square wave, triangle wave, saw tooth wave and pulse wave. The waveform generator consists of two parts: system hardware design and system software design, in the s
5、ystem hardware design, the microcontroller STC89C52 is the core of the design, through I/O interface design to extend the DA converter module, waveform selector buttons, 74LS165 module the parallel input string line output and the LCD1602 module of frequency, magnitude of the display. And through th
6、e SCM simulation software PROTEUS7.5 to design and produce of the printed circuit board (PCB) of the waveform generator. System software design is done with assembly language in the integrated development environment WAVE6000, including the main Program, four waveform generator subroutine, key funct
7、ions and display subroutines modules. This system can realize that frequency and amplitude of waveform is real-timeadjustable and flexible. The system development costs is in the hundred with a high accuracy, the error is small, low power consumption, faster data transfer speeds, high reliability, there is a certain development value. The tested frequency and amplitude of the system is consistent with the actual waveform. KEY WORDS waveform generator, stc89C52, lcd1602, dac0832