1、 课程设计(论文)说明书 题 目: 方波发生器的设计方波发生器的设计 院 (系) : 专 业: 电子信息工程 学生姓名: 学 号: 指导教师: 职 称: 20 年 月 日 第 1 页 共 16 页 摘 要 本次课程设计以 AT89S51 单片机为核心器件,外围采用按键作为控制以及 LCD1602 作为显示器所设计的方波发生器。该方波发生器能实现 0-1kHz 频率范围、占空比可调 的方波输出。其核心技术为单片机并行端口的应用、单片机定时器中断应用和数字分离 的 ASCII 码液晶显示技术。采用 8 个独立的按键组成控制模块,操作方便,按键控制模 式可以通过程序进行设定;显示模块则由液晶屏 16
2、02 构成,能显示出实时输出方波的 频率及占空比,直观明了。设计过程中遇到的问题是输出方波的频率、占空比与液晶显 示数据存在误差,通过不断调试程序,合理编写中断服务程序来修正误差提高精确度, 达到设计要求。该方波发生器具有线路简单、结构紧凑、价格低廉、性能优越等优点。 关键词:方波发生器;AT89S51 单片机;键盘;LCD1602 第 2 页 共 16 页 Abstract The course design AT89S51 microcontroller as the core device, the external use of buttons as a control and LCD
3、1602 displays are designed as a square wave generator. The square wave generator to achieve 0-1kHz frequency range, adjustable duty cycle square wave output. The core technology for the application of single chip parallel port, SCM applications and digital timer interrupt ASCII code separate liquid
4、crystal display technology. 8-independent component control module buttons, easy to operate key control mode can be set through the program; display module constituted by the LCD1602, can show real-time output frequency and duty cycle square wave, intuitive and clear. Problems encountered in the design process is the output square wave frequency, duty cycle and LCD display data errors exist, through continuous commissioning p