单片机最小系统protues程序实现

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

目录

摘要................................................................................... I Abstrct ............................................................................... I I 1设计任务及要求 (3)

2整机概述 (5)

3单片机最小系统基本原理 (6)

3.1 STC89C52介绍 (6)

3.2 复位电路 (8)

3.3晶振电路 (8)

3.4 单片机最小系统 (9)

4扩展电路基本原理 (11)

4.1数码管显示电路 (11)

4.2矩阵键盘电路 (12)

4.3串口通信电路 (13)

4.3.1串口通信 (13)

4.3.2串行通信控制寄存器 (14)

4.3.3串行口的工作方式 (15)

5整机电路设计图 (19)

6软件设计 (20)

6.1程序编写软件Keil (20)

6.2仿真软件Proteus (20)

6.3 软件设计详情 (20)

6.3.1 键盘扫描 (20)

6.3.2串行通信接收程序 (21)

7 仿真结果 (23)

7.1数据输入 (23)

7.2串行串口通信 (23)

8 实物展示 (25)

9心得体会 (26)

参考文献 (27)

附录Ⅰ:元件清单 (28)

附录Ⅱ:总程序设计 (29)

摘要

单片微型计算机简称单片机,又称为微型控制器,是微型计算机的一个重要分支。随着电子技术的发展,大规模及超大规模集成电路和制造工艺的进一步提高,单片机以其高可靠性、高性价比、低电压、低功耗等一系列优点,广泛应用于控制系统、数据采集系统、智能化仪器表等领域。单片机最小系统电路板在单片机开发市场和大学生电子设计方面十分流行。

本次课程设计包括STC89S52单片机最小系统、4×4矩阵键盘、独立6个8段LED 数码管显示电路以及串口通信。其中单片机最小系统包括单片机、晶振电路、复位电路和供电系统。经过系统的分析设计后,利用Keil软件编程以及Proteus软件仿真,巩固单片机应用、模拟电路、数字电路课程及学会各种工程软件的使用。仿真成功后开始实物的安装和调试,实现实习要求的功能。

关键词:单片机数码管显示矩阵键盘

Abstrct

As the single chip computer, also known as micro controller, is an important branch of microcomputer. With the development of electronic technology, further improve the large-scale and ultra large scale integrated circuit and manufacturing technology, single chip with a series of advantages of high reliability, high performance, low voltage, low power consumption, is widely applied in the control system, data acquisition system, intelligent instrument etc.. MCU minimum system circuit board is very popular in the SCM development market and Undergraduate Electronic design. The curriculum design includes STC89S52 minimum system microcontroller, 4 * 4 matrix keyboard, the independent 6 LED 8 segment digital tube display circuit and the serial communication. The smallest single-chip system consists of single chip microcomputer, crystal circuit, reset circuit and power supply system. Through the analysis and design the system, using Keil software programming and Proteus software simulation, the use of the consolidation of SCM application, analog circuit, digital circuit course and learn all kinds of Engineering software. After the success of simulation to begin the installation and debugging of real, practice the requirements of function.

Keywords:Single chip digital tube display matrix keyboard

1设计任务及要求

1、完成包含如下系统功能组件的单片机最小系统的设计、焊接、调试

(1)键盘

一个4X4的矩阵键盘,其中,10个按键是0~9数字键;另外6个是功能键,用于功能选择和控制,如“数据输入”、“数据显示”、“串行通信”功能选择键,以及“回车”、“清除”、控制键。

(2)显示电路

由6个7段LED数码管组成的显示电路。

(3)串口串行通信

利用51的串口实现串行通信接口电路。

2、完成ISP下载电路的设计、焊接

3、完成系统软件的设计,包括程序结构设计、流程图绘制、程序设计,实现如下功能

(1)功能选择

通过功能选择键,使得单片机处于不同的工作状态并通过LED显示相应的内容;可选择的功能包括:数据输入;数据显示;串口通信

(2)数据输入

通过功能选择键选择“数据输入”后,可分次输入10个4位十进制数据,并将输入的数据保存在内部RAM中。数据输入要求:

第一步输入序号0~9,表明输入的是第几个4位十进制数据;

第二步按下回车键,完成序号输入;

第三步输入最多4位的十进制数据;

第四步按下回车键,完成数据输入;

重复第一步,开始新数据的输入;

输入数据的显示格式是:最左边是序号,然后是空格,之后是从右到左的最多4位十进制数;

若在输入过程中(第一步或第三步)出现错误,按“清除”键,重新从第一步开始输入数据。

或者,自己设计10个十进制数的输入及显示方式。

(3)数据显示

通过功能选择键选择“数据显示”后,可显示之前输入的10个4位十进制数据中的任一个,要求:

第一步输入序号0~9,表明显示的是第几个4位十进制数据;

相关文档
最新文档