基于Proteus和Keil的单片机仿真实验系统设计 下载本文

内容发布更新时间 : 2024/5/4 18:50:28星期一 下面是文章的全部内容请认真阅读。

河 北 建 筑 工 程 学 院

本科毕业设计(论文)

题 目 基于Proteus和Keil的单片机仿真实验系统设计

学 科 专 业 机械电子工程

级 机电102班 姓 名 冯立岗 指 导 教 师 张东辉

摘要

本设计是基于51系列的单片机进行的单片机实验仿真系统设计,可以进行

键盘输入显示、计数器、流水灯、LCD显示字符、抢答器等八个实验的仿真。 单片机实验仿真系统的设计过程在硬件与软件方面进行同步设计。硬件部分主要由AT89C51单片机,4×4键盘阵列,七段数码管显示,8×8LED显示模块,16×16LED点阵显示模块,流水灯模块,LCD液晶模块,以及抢答器按键电路等组成,系统通过LED及LCD显示数据,所以具有人性化的操作和直观的显示效果。软件方面主要包括时钟程序、键盘程序,显示程序等。由于本设计实验项目有多个,考虑到汇编语言并不适于比较繁琐的程序的编写,故本系统以单片机的C语言进行软件设计,为了便于扩展和更改,软件的设计采用模块化结构,使程序设计的逻辑关系更加简洁明了,以便更简单地实现实验的选取及显示功能。所有程序在Keil软件编写完成后调试编译最后生成hex格式的文件导入到Proteus软件中进行调试,确定没有问题后,在Proteus软件中嵌入单片机内进行仿真。

关键词:AT89C51;流水灯;抢答器;键盘

ABSTRACT

It is a design of single chip experimental simulation system based on the 51

series single chip. It can perform eight experimental simulations including the keyboard input display, counter, water lights, LCD display character, responder. This design’s process is designed to synchronize the hardware and software aspects. The hardware part is mainly composed of AT89C51 microcontroller,4*4 keyboard array, seven segment LED display, 8*8 LED display module, 16*16 dot matrix display module, water light module, LCD liquid crystal module and responder key circuit and other components. The system displays the data via LED and LCD, so it has humanized operation and intuitive display effect. The software includes a clock procedure, the keyboard procedure and the display procedure. Since there are many experimental projects in this design, assembly language does not take into account the relatively cumbersome procedures for the preparation, and the system is designed of the microcontroller C language. In order to facilitate the expansion and change, the software is designed with modular structure, so that the logic programming is more concise and easier to realize the experimental selection and display. All the programs are debugged and compiled after the completion of the written of the keil software. And the final completed files of hex form are debugged in the Proteus software. When there is no problem, embedded the microcontroller into the Proteus software to simulate.

Key words: AT89C51;water lights;responder;keyboard